summaryrefslogtreecommitdiff
path: root/network.h
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-01-31 22:16:15 +0000
committerDarkvater <darkvater@openttd.org>2006-01-31 22:16:15 +0000
commitf2448ebfd4324b0c914e36b81801fc1ffa04da94 (patch)
tree763ef198108c0320af48fbac22bf9c998430da2d /network.h
parent9d07426a29817fbaddcb8f8c726e16a32bb123d0 (diff)
downloadopenttd-f2448ebfd4324b0c914e36b81801fc1ffa04da94.tar.xz
(svn r3500) - Workaround the inaccurate count of spectators/companies that can happen in certain border-cases. For now just dynamically get this value when requested so it is always right. To do properly all player/client creation/destruction needs a hook for networking.
Diffstat (limited to 'network.h')
-rw-r--r--network.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/network.h b/network.h
index b8840ded7..30b75e636 100644
--- a/network.h
+++ b/network.h
@@ -73,9 +73,9 @@ typedef struct NetworkGameInfo {
byte clients_max; // Max clients allowed on server
byte clients_on; // Current count of clients on server
byte companies_max; // Max companies allowed on server
- byte companies_on; // How many started companies do we have
+ byte companies_on; // How many started companies do we have (XXX - disabled for server atm, use ActivePlayerCount())
byte spectators_max; // Max spectators allowed on server
- byte spectators_on; // How many spectators do we have?
+ byte spectators_on; // How many spectators do we have? (XXX - disabled for server atm, use NetworkSpectatorCount())
uint16 game_date; // Current date
uint16 start_date; // When the game started
char map_name[NETWORK_NAME_LENGTH]; // Map which is played ["random" for a randomized map]
@@ -210,6 +210,8 @@ VARDEF uint16 _network_restart_game_date; // If this year is reached, the ser
NetworkGameList *NetworkQueryServer(const char* host, unsigned short port, bool game_info);
+byte NetworkSpectatorCount(void);
+
#endif /* ENABLE_NETWORK */
// Those variables must always be registered!