(svn r26449) -Add: Allow more sound sleep for dedicated servers when there's nothing to do and nobody paying attention
This commit is contained in:
@@ -96,6 +96,18 @@ byte _network_clients_connected = 0;
|
||||
/* Some externs / forwards */
|
||||
extern void StateGameLoop();
|
||||
|
||||
/**
|
||||
* Return whether there is any client connected or trying to connect at all.
|
||||
* @return whether we have any client activity
|
||||
*/
|
||||
bool HasClients()
|
||||
{
|
||||
NetworkClientSocket *cs;
|
||||
FOR_ALL_CLIENT_SOCKETS(cs) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Basically a client is leaving us right now.
|
||||
*/
|
||||
|
@@ -18,6 +18,7 @@
|
||||
void NetworkStartUp();
|
||||
void NetworkShutDown();
|
||||
void NetworkDrawChatMessage();
|
||||
bool HasClients();
|
||||
|
||||
extern bool _networking; ///< are we in networking mode?
|
||||
extern bool _network_server; ///< network-server is active
|
||||
@@ -31,6 +32,7 @@ extern bool _is_network_server; ///< Does this client wants to be a network-ser
|
||||
static inline void NetworkStartUp() {}
|
||||
static inline void NetworkShutDown() {}
|
||||
static inline void NetworkDrawChatMessage() {}
|
||||
static inline bool HasClients() { return false; }
|
||||
|
||||
#define _networking 0
|
||||
#define _network_server 0
|
||||
|
Reference in New Issue
Block a user