summaryrefslogtreecommitdiff
path: root/player.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
commit5502f3bf3d3b16458da1d8bfdd8bb9c960a1f10a (patch)
tree763ef198108c0320af48fbac22bf9c998430da2d /player.h
parentbfe7040cde43d9e23bf3346860f865b922f186f1 (diff)
downloadopenttd-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/player.h b/player.h
index 001d17e31..00150ecbb 100644
--- a/player.h
+++ b/player.h
@@ -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));