| 192 | } |
| 193 | |
| 194 | void VideoDriver_Dedicated::MainLoop() |
| 195 | { |
| 196 | /* Signal handlers */ |
| 197 | #if defined(UNIX) |
| 198 | signal(SIGTERM, DedicatedSignalHandler); |
| 199 | signal(SIGINT, DedicatedSignalHandler); |
| 200 | signal(SIGQUIT, DedicatedSignalHandler); |
| 201 | #endif |
| 202 | |
| 203 | /* Load the dedicated server stuff */ |
| 204 | _is_network_server = true; |
| 205 | _network_dedicated = true; |
| 206 | _current_company = _local_company = COMPANY_SPECTATOR; |
| 207 | |
| 208 | /* If SwitchMode is SM_LOAD_GAME / SM_START_HEIGHTMAP, it means that the user used the '-g' options */ |
| 209 | if (_switch_mode != SM_LOAD_GAME && _switch_mode != SM_START_HEIGHTMAP) { |
| 210 | StartNewGameWithoutGUI(GENERATE_NEW_SEED); |
| 211 | } |
| 212 | |
| 213 | this->is_game_threaded = false; |
| 214 | |
| 215 | /* Done loading, start game! */ |
| 216 | |
| 217 | while (!_exit_game) { |
| 218 | if (!_dedicated_forks) DedicatedHandleKeyInput(); |
| 219 | this->DrainCommandQueue(); |
| 220 | |
| 221 | this->Tick(); |
| 222 | this->SleepTillNextTick(); |
| 223 | } |
| 224 | } |
nothing calls this directly
no test coverage detected