summaryrefslogtreecommitdiff
path: root/src/command.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-07 15:27:19 +0000
committerrubidium <rubidium@openttd.org>2009-01-07 15:27:19 +0000
commit8d017f0ea1e21276d00f3325acd71e40c53cfc39 (patch)
tree26ecdc3e2c01b662df452e9e13bbf21461754bc2 /src/command.cpp
parentf5b23103d7f73f1b5e5828133f20e8914f7e2a3e (diff)
downloadopenttd-8d017f0ea1e21276d00f3325acd71e40c53cfc39.tar.xz
(svn r14897) -Codechange: don't allow a few command flags to be sent over the network as it's bogus information anyway; e.g. the "do not send over network" flag as it will be set whenever the command is received from the server/client.
-Codechange: test earlier whether the command (send from the server) is actually valid.
Diffstat (limited to 'src/command.cpp')
-rw-r--r--src/command.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command.cpp b/src/command.cpp
index 03a7d3c80..08a9269aa 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -560,7 +560,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
if (_networking && !(cmd & CMD_NETWORK_COMMAND)) {
CompanyID bck = _local_company;
if (_network_dedicated || (_network_server && bck == COMPANY_SPECTATOR)) _local_company = COMPANY_FIRST;
- NetworkSend_Command(tile, p1, p2, cmd, callback, text);
+ NetworkSend_Command(tile, p1, p2, cmd & ~CMD_FLAGS_MASK, callback, text);
if (_network_dedicated || (_network_server && bck == COMPANY_SPECTATOR)) _local_company = bck;
_docommand_recursive = 0;
ClearStorageChanges(false);