summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:58:59 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:58:59 +0000
commit55de5d336c2b82aa2393a28e09b64f72f4661a25 (patch)
treee22b50238bfb53086c4e27e0d8487f9e332f7b6f /src/network
parent5ff98b45c1f9097f521c95cfa46728e1f39a8f6d (diff)
downloadopenttd-55de5d336c2b82aa2393a28e09b64f72f4661a25.tar.xz
(svn r23618) -Add: ScriptGame::Pause, ScriptGame::Unpause, and ScriptGame::GetLandscape (GameScript only)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index 52c6cb464..e4dafe096 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -336,6 +336,7 @@ void NetworkHandlePauseChange(PauseMode prev_mode, PauseMode changed_mode)
switch (changed_mode) {
case PM_PAUSED_NORMAL:
case PM_PAUSED_JOIN:
+ case PM_PAUSED_GAME_SCRIPT:
case PM_PAUSED_ACTIVE_CLIENTS: {
bool changed = ((_pause_mode == PM_UNPAUSED) != (prev_mode == PM_UNPAUSED));
bool paused = (_pause_mode != PM_UNPAUSED);
@@ -344,14 +345,17 @@ void NetworkHandlePauseChange(PauseMode prev_mode, PauseMode changed_mode)
StringID str;
if (!changed) {
int i = -1;
+
if ((_pause_mode & PM_PAUSED_NORMAL) != PM_UNPAUSED) SetDParam(++i, STR_NETWORK_SERVER_MESSAGE_GAME_REASON_MANUAL);
if ((_pause_mode & PM_PAUSED_JOIN) != PM_UNPAUSED) SetDParam(++i, STR_NETWORK_SERVER_MESSAGE_GAME_REASON_CONNECTING_CLIENTS);
+ if ((_pause_mode & PM_PAUSED_GAME_SCRIPT) != PM_UNPAUSED) SetDParam(++i, STR_NETWORK_SERVER_MESSAGE_GAME_REASON_GAME_SCRIPT);
if ((_pause_mode & PM_PAUSED_ACTIVE_CLIENTS) != PM_UNPAUSED) SetDParam(++i, STR_NETWORK_SERVER_MESSAGE_GAME_REASON_NOT_ENOUGH_PLAYERS);
str = STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_1 + i;
} else {
switch (changed_mode) {
case PM_PAUSED_NORMAL: SetDParam(0, STR_NETWORK_SERVER_MESSAGE_GAME_REASON_MANUAL); break;
case PM_PAUSED_JOIN: SetDParam(0, STR_NETWORK_SERVER_MESSAGE_GAME_REASON_CONNECTING_CLIENTS); break;
+ case PM_PAUSED_GAME_SCRIPT: SetDParam(0, STR_NETWORK_SERVER_MESSAGE_GAME_REASON_GAME_SCRIPT); break;
case PM_PAUSED_ACTIVE_CLIENTS: SetDParam(0, STR_NETWORK_SERVER_MESSAGE_GAME_REASON_NOT_ENOUGH_PLAYERS); break;
default: NOT_REACHED();
}