diff src/command.cpp @ 10608:b2e3a8e44c6f draft

(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.
author rubidium <rubidium@openttd.org>
date Wed, 07 Jan 2009 15:27:19 +0000 (2009-01-07)
parents e3b26a6536ae
children 2f1e024c151f
line wrap: on
line diff
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -560,7 +560,7 @@
 	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);