summaryrefslogtreecommitdiff
path: root/ai
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-10-14 22:31:18 +0000
committerDarkvater <Darkvater@openttd.org>2006-10-14 22:31:18 +0000
commit4c9d9a87f18191ae9ae4368176c96b89dd172c8f (patch)
tree52f21281bd10b45ef340a15357a04bf130b9b554 /ai
parent2380bb56cd4a25eef126153bb6b5ccde8222fc5c (diff)
downloadopenttd-4c9d9a87f18191ae9ae4368176c96b89dd172c8f.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 'ai')
-rw-r--r--ai/ai.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ai/ai.c b/ai/ai.c
index baa2166b1..9072d8fe6 100644
--- a/ai/ai.c
+++ b/ai/ai.c
@@ -213,7 +213,7 @@ void AI_RunGameLoop(void)
*/
void AI_StartNewAI(PlayerID player)
{
- assert(player < MAX_PLAYERS);
+ assert(IsValidPlayer(player));
/* Called if a new AI is booted */
_ai_player[player].active = true;