From 6b6d908308c9aaf32f7b99500715319aaab1a51c 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. --- openttd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openttd.c') diff --git a/openttd.c b/openttd.c index 77a8256f2..a99cdc32c 100644 --- a/openttd.c +++ b/openttd.c @@ -1257,7 +1257,7 @@ bool AfterLoadGame(void) p->engine_renew_months = -6; p->engine_renew_money = 100000; } - if (_local_player < MAX_PLAYERS) { + if (IsValidPlayer(_local_player)) { // Set the human controlled player to the patch settings // Scenario editor do not have any companies p = GetPlayer(_local_player); -- cgit v1.2.3-70-g09d2