diff options
author | rubidium <rubidium@openttd.org> | 2009-05-26 21:25:24 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-26 21:25:24 +0000 |
commit | bacbafe51094ab88c1e215d441566715040846c9 (patch) | |
tree | f0b49c50760c7a029b954e0bc7a96423a38ab0a4 /src/network | |
parent | 5b92584c402b70a04b8250c14f71fa01e271dafb (diff) | |
download | openttd-bacbafe51094ab88c1e215d441566715040846c9.tar.xz |
(svn r16437) -Codechange: remove the hack that for CMD_COMPANY_CTRL the company was changed from spectator to company 0 in the network code.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_server.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 07c638b09..8b1a5b669 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -895,7 +895,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) * @see CmdCompanyCtrl() */ if (cp.cmd == CMD_COMPANY_CTRL) { - if (cp.p1 != 0) { + if (cp.p1 != 0 || cp.company != COMPANY_SPECTATOR) { SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_CHEATER); return; } @@ -906,10 +906,6 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) return; } - /* XXX - Execute the command as a valid company. Normally this would be done by a - * spectator, but that is not allowed any commands. So do an impersonation. The drawback - * of this is that the first company's last_built_tile is also updated... */ - cp.company = OWNER_BEGIN; cp.p2 = cs->client_id; } |