summaryrefslogtreecommitdiff
path: root/openttd.c
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
commit6b6d908308c9aaf32f7b99500715319aaab1a51c (patch)
tree52f21281bd10b45ef340a15357a04bf130b9b554 /openttd.c
parent9732c129c16dea48e69188b75c2e39f9faacf86f (diff)
downloadopenttd-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 'openttd.c')
-rw-r--r--openttd.c2
1 files changed, 1 insertions, 1 deletions
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);