From 4c9d9a87f18191ae9ae4368176c96b89dd172c8f Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sat, 14 Oct 2006 22:31:18 +0000 Subject: (svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an actual playable player (< MAX_PLAYERS) or not. --- player.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'player.h') diff --git a/player.h b/player.h index 229d996c9..0b17c3d4b 100644 --- a/player.h +++ b/player.h @@ -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); -- cgit v1.2.3-54-g00ecf