diff options
author | Darkvater <darkvater@openttd.org> | 2006-10-14 22:31:18 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-10-14 22:31:18 +0000 |
commit | 6b6d908308c9aaf32f7b99500715319aaab1a51c (patch) | |
tree | 52f21281bd10b45ef340a15357a04bf130b9b554 /player.h | |
parent | 9732c129c16dea48e69188b75c2e39f9faacf86f (diff) | |
download | openttd-6b6d908308c9aaf32f7b99500715319aaab1a51c.tar.xz |
(svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an
actual playable player (< MAX_PLAYERS) or not.
Diffstat (limited to 'player.h')
-rw-r--r-- | player.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -245,6 +245,11 @@ static inline bool IsLocalPlayer(void) return _local_player == _current_player; } +static inline bool IsValidPlayer(PlayerID pi) +{ + return pi < MAX_PLAYERS; +} + void DeletePlayerWindows(PlayerID pi); byte GetPlayerRailtypes(PlayerID p); |