| 272 | int prefixLen = normalized.size(); |
| 273 | for (int i = 0; i < GFileBanks.Size(); i++) |
| 274 | { |
| 275 | QFBank& bank = GFileBanks[i]; |
| 276 | if (strnicmp(bank.GetPrefix(), normalized.c_str(), prefixLen) == 0) |
| 277 | { |
| 278 | return &bank; |
| 279 | } |
| 280 | } |
| 281 | return nullptr; |
| 282 | } |
| 283 | |
| 284 | NetworkServer::NetworkServer(NetworkManager* parent, int port, RString password) : NetworkComponent(parent) |
| 285 | { |
| 286 | _botClient = 0xFFFFFFFF; |
| 287 | _state = NGSCreate; |
| 288 | _stateEnteredTime = GlobalTickCount(); |
| 289 | _password = password.GetLength() > 0; |
| 290 | |
| 291 | _nextPlayerId = 1; |
| 292 | |
| 293 | Verify(Init(port, password)); |
| 294 | |
| 295 | _param1 = FLT_MAX; |
| 296 | _param2 = FLT_MAX; |
| 297 | |
| 298 | _kickDuplicate = false; |
| 299 | _dedicated = false; |
| 300 | _cadetMode = false; |
| 301 | _missionIndex = -1; |
| 302 | |
| 303 | _gameMaster = AI_PLAYER; |
| 304 | _admin = false; |
| 305 | _restart = false; |
| 306 | _reassign = false; |
| 307 | |
| 308 | Monitor(0); |
| 309 | _debugNext = INT_MAX; |
| 310 | _debugInterval = 0; |
| 311 | |
| 312 | _pingUpdateNext = GlobalTickCount() + 5000; |
| 313 | |
| 314 | _sessionLocked = false; |
| 315 | |
| 316 | _equalModRequired = false; |
| 317 | |
| 318 | // ensure no content remain |
| 319 | if (_server) |
| 320 | { |
| 321 | Poseidon::DeleteDirectoryStructure(GetServerTmpDir(), false); |
| 322 | } |
nothing calls this directly
no test coverage detected