| 329 | } |
| 330 | |
| 331 | void NetworkServer::runGameCommands() |
| 332 | { |
| 333 | auto& gameState = getGameState(); |
| 334 | auto tick = gameState.scenarioTicks; |
| 335 | |
| 336 | // Execute all following commands if previously received |
| 337 | while (!_gameCommands.empty()) |
| 338 | { |
| 339 | auto& gc = _gameCommands.front(); |
| 340 | |
| 341 | [[maybe_unused]] auto result = GameCommands::doCommandForReal(static_cast<GameCommands::GameCommand>(gc.regs.esi), gc.company, gc.regs); |
| 342 | |
| 343 | // TODO We can't do this, we have to send a dummy command to the clients |
| 344 | // otherwise we skip a game command index |
| 345 | // if (result != 0x80000000) |
| 346 | // { |
| 347 | sendGameCommand(gc.index, tick, gc.company, gc.regs); |
| 348 | // } |
| 349 | |
| 350 | _gameCommands.pop(); |
| 351 | } |
| 352 | } |
no test coverage detected