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 | 5502f3bf3d3b16458da1d8bfdd8bb9c960a1f10a (patch) | |
tree | 763ef198108c0320af48fbac22bf9c998430da2d /player.h | |
parent | bfe7040cde43d9e23bf3346860f865b922f186f1 (diff) | |
download | openttd-5502f3bf3d3b16458da1d8bfdd8bb9c960a1f10a.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)); |