(svn r22063) -Change: make the "has network" check also check whether the client is actually fully connected

This commit is contained in:
rubidium
2011-02-11 22:10:10 +00:00
parent 7de823b1bd
commit 1dc5ba2210
3 changed files with 13 additions and 1 deletions

View File

@@ -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;
}