diff options
author | rubidium <rubidium@openttd.org> | 2011-02-11 22:10:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-02-11 22:10:10 +0000 |
commit | 1dc5ba22105bc12ab13e79f3a8a22952d82f7c8e (patch) | |
tree | 5dbb01c8feb4617774850fb0e97c2a653247cf55 /src/console_cmds.cpp | |
parent | 7de823b1bde0f48fd5bd235ffdcc032eda5cdd1b (diff) | |
download | openttd-1dc5ba22105bc12ab13e79f3a8a22952d82f7c8e.tar.xz |
(svn r22063) -Change: make the "has network" check also check whether the client is actually fully connected
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index a8e4c3eb8..7cd18bd6e 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -19,6 +19,7 @@ #include "network/network_func.h" #include "network/network_base.h" #include "network/network_admin.h" +#include "network/network_client.h" #include "command_func.h" #include "settings_func.h" #include "fios.h" @@ -90,7 +91,7 @@ DEF_CONSOLE_HOOK(ConHookNeedNetwork) { if (!NetworkAvailable(echo)) return CHR_DISALLOW; - if (!_networking) { + if (!_networking || (!_network_server && !MyClient::IsConnected())) { if (echo) IConsoleError("Not connected. This command is only available in multiplayer."); return CHR_DISALLOW; } |