mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-20 04:59:11 +00:00
(svn r22063) -Change: make the "has network" check also check whether the client is actually fully connected
This commit is contained in:
@@ -463,6 +463,15 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendMove(CompanyID company, co
|
||||
return NETWORK_RECV_STATUS_OKAY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the client is actually connected (and in the game).
|
||||
* @return True when the client is connected.
|
||||
*/
|
||||
bool ClientNetworkGameSocketHandler::IsConnected()
|
||||
{
|
||||
return my_client != NULL && my_client->status == STATUS_ACTIVE;
|
||||
}
|
||||
|
||||
|
||||
/***********
|
||||
* Receiving functions
|
||||
|
@@ -100,6 +100,8 @@ public:
|
||||
static NetworkRecvStatus SendRCon(const char *password, const char *command);
|
||||
static NetworkRecvStatus SendMove(CompanyID company, const char *password);
|
||||
|
||||
static bool IsConnected();
|
||||
|
||||
static void Send();
|
||||
static bool Receive();
|
||||
static bool GameLoop();
|
||||
|
Reference in New Issue
Block a user