(svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother -Fix: new game + pause on new game + autopause make the game not unpause on the first join
This commit is contained in:
@@ -472,8 +472,15 @@ DEF_CONSOLE_CMD(ConPauseGame)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_pause_game == 0) {
|
||||
DoCommandP(0, 1, 0, CMD_PAUSE);
|
||||
#ifdef ENABLE_NETWORK
|
||||
if (_network_dedicated && _settings_client.network.min_active_clients != 0) {
|
||||
IConsolePrint(CC_WARNING, "Manual pausing is disabled. Set network.min_active_clients to 0 (disable autopausing) to enable manual pausing.");
|
||||
return true;
|
||||
}
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
if (_pause_mode == PM_UNPAUSED) {
|
||||
DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
|
||||
IConsolePrint(CC_DEFAULT, "Game paused.");
|
||||
} else {
|
||||
IConsolePrint(CC_DEFAULT, "Game is already paused.");
|
||||
@@ -489,8 +496,15 @@ DEF_CONSOLE_CMD(ConUnPauseGame)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_pause_game != 0) {
|
||||
DoCommandP(0, 0, 0, CMD_PAUSE);
|
||||
#ifdef ENABLE_NETWORK
|
||||
if (_network_dedicated && _settings_client.network.min_active_clients != 0) {
|
||||
IConsolePrint(CC_WARNING, "Manual unpausing is disabled. Set network.min_active_clients to 0 (disable autopausing) to enable manual unpausing.");
|
||||
return true;
|
||||
}
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
if (_pause_mode != PM_UNPAUSED) {
|
||||
DoCommandP(0, PM_PAUSED_NORMAL, 0, CMD_PAUSE);
|
||||
IConsolePrint(CC_DEFAULT, "Game unpaused.");
|
||||
} else {
|
||||
IConsolePrint(CC_DEFAULT, "Game is already unpaused.");
|
||||
|
Reference in New Issue
Block a user