summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-12 20:38:52 +0000
committerrubidium <rubidium@openttd.org>2009-11-12 20:38:52 +0000
commit64ecceadda07d6c40d21f4a6c8911c2fdf86b921 (patch)
tree64035f9f923854d44b3e3db05b06256148af2b82 /src
parent2a1cab4d46260dfe7930503ca0c3e45f1679269f (diff)
downloadopenttd-64ecceadda07d6c40d21f4a6c8911c2fdf86b921.tar.xz
(svn r18053) -Codechange: remove the manual pause/unpause limitation with min_active_clients
Diffstat (limited to 'src')
-rw-r--r--src/console_cmds.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 7d62d3b58..85cfe6199 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -491,16 +491,9 @@ DEF_CONSOLE_CMD(ConPauseGame)
return true;
}
-#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) {
+ if ((_pause_mode & PM_PAUSED_NORMAL) == PM_UNPAUSED) {
DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
- IConsolePrint(CC_DEFAULT, "Game paused.");
+ if (!_networking) IConsolePrint(CC_DEFAULT, "Game paused.");
} else {
IConsolePrint(CC_DEFAULT, "Game is already paused.");
}
@@ -515,16 +508,13 @@ DEF_CONSOLE_CMD(ConUnPauseGame)
return true;
}
-#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) {
+ if ((_pause_mode & PM_PAUSED_NORMAL) != PM_UNPAUSED) {
DoCommandP(0, PM_PAUSED_NORMAL, 0, CMD_PAUSE);
- IConsolePrint(CC_DEFAULT, "Game unpaused.");
+ if (!_networking) IConsolePrint(CC_DEFAULT, "Game unpaused.");
+ } else if ((_pause_mode & PM_PAUSED_ERROR) != PM_UNPAUSED) {
+ IConsolePrint(CC_DEFAULT, "Game is in error state and cannot be unpaused via console.");
+ } else if (_pause_mode != PM_UNPAUSED) {
+ IConsolePrint(CC_DEFAULT, "Game cannot be unpaused manually; disable pause_on_join/min_active_clients.");
} else {
IConsolePrint(CC_DEFAULT, "Game is already unpaused.");
}