summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-09-12 17:36:29 +0000
committertruelight <truelight@openttd.org>2004-09-12 17:36:29 +0000
commit53ee4f65400c3ca0f968bc2d54482677ad914253 (patch)
treeeff9e1d88fcec3bc009cde1921f41ee61b099dbc
parent9be6a4cea40908a03b69c3d1e9bbf57397cc55ac (diff)
downloadopenttd-53ee4f65400c3ca0f968bc2d54482677ad914253.tar.xz
(svn r216) -Fix: paused network game now disallows all commands (instead of doing
the commands all at once when the game unpauses)
-rw-r--r--command.c9
-rw-r--r--lang/english.txt1
2 files changed, 10 insertions, 0 deletions
diff --git a/command.c b/command.c
index 35ca10ce5..1161e230b 100644
--- a/command.c
+++ b/command.c
@@ -385,6 +385,15 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
assert(_docommand_recursive == 0);
+ if (_networking && !(cmd & CMD_NET_INSTANT) && _pause) {
+ // When the game is paused, and we are in a network game
+ // we do not allow any commands. This is because
+ // of some technical reasons
+ ShowErrorMessage(-1, STR_MULTIPLAYER_PAUSED, x, y);
+ _docommand_recursive = 0;
+ return true;
+ }
+
_error_message = INVALID_STRING_ID;
_error_message_2 = cmd >> 16;
_additional_cash_required = 0;
diff --git a/lang/english.txt b/lang/english.txt
index e99a6ffc5..02afd97d8 100644
--- a/lang/english.txt
+++ b/lang/english.txt
@@ -2556,6 +2556,7 @@ STR_B006_FLOOD_VEHICLE_DESTROYED :{BLACK}{BIGFONT}Floods!{}At least {COMMA16} p
STR_BRIBE_FAILED :{WHITE}Your attempted bribery has been
STR_BRIBE_FAILED_2 :{WHITE}discovered by a regional investigator
STR_BUILD_DATE :{BLACK}Built: {LTBLUE}{DATE_LONG}
+STR_MULTIPLAYER_PAUSED :{WHITE}Game is paused.{}Command cannot be executed
STR_PERFORMANCE_DETAIL :{WHITE}Detail performance rating
STR_PERFORMANCE_DETAIL_KEY :{BLACK}Detail