summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2007-01-10 14:52:10 +0000
committercelestar <celestar@openttd.org>2007-01-10 14:52:10 +0000
commit241ebb589000bf1f1c859d6ef3e2a4ec3dd065dc (patch)
tree4ae5a97107b0d1cdc6508b18a384dd05317cba8a /src
parent077448ead7b6a1a73913a9de6b83dd671bc44114 (diff)
downloadopenttd-241ebb589000bf1f1c859d6ef3e2a4ec3dd065dc.tar.xz
(svn r8027) -Fix (FS#486) If a pause command is issues, it will now pause the game even if shift is pressed instead of giving a cost estimate of 0. This fixes a problem where the server does not pause_on_join when the player on the interactive server has the shift button pressed. (Thanks to pvz for the report and the fix)
Diffstat (limited to 'src')
-rw-r--r--src/command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/command.c b/src/command.c
index f99371946..ad93fc643 100644
--- a/src/command.c
+++ b/src/command.c
@@ -463,7 +463,11 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
_docommand_recursive = 1;
// cost estimation only?
- if (!IsGeneratingWorld() && _shift_pressed && IsLocalPlayer() && !(cmd & (CMD_NETWORK_COMMAND | CMD_SHOW_NO_ERROR))) {
+ if (!IsGeneratingWorld() &&
+ _shift_pressed &&
+ IsLocalPlayer() &&
+ !(cmd & (CMD_NETWORK_COMMAND | CMD_SHOW_NO_ERROR)) &&
+ (cmd & 0xFF) != CMD_PAUSE) {
// estimate the cost.
res = proc(tile, flags, p1, p2);
if (CmdFailed(res)) {