diff options
author | Darkvater <darkvater@openttd.org> | 2006-01-31 22:16:15 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-01-31 22:16:15 +0000 |
commit | f2448ebfd4324b0c914e36b81801fc1ffa04da94 (patch) | |
tree | 763ef198108c0320af48fbac22bf9c998430da2d /player.h | |
parent | 9d07426a29817fbaddcb8f8c726e16a32bb123d0 (diff) | |
download | openttd-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 'player.h')
-rw-r--r-- | player.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -211,6 +211,8 @@ VARDEF Player _players[MAX_PLAYERS]; // NOSAVE: can be determined from player structs VARDEF byte _player_colors[MAX_PLAYERS]; +byte ActivePlayerCount(void); + static inline Player* GetPlayer(PlayerID i) { assert(i < lengthof(_players)); |