summaryrefslogtreecommitdiff
path: root/engine.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-09-28 19:35:36 +0000
committertron <tron@openttd.org>2005-09-28 19:35:36 +0000
commit90e33aed225cf00a75185d731cad5ce1c3520559 (patch)
treefabd4f30d2f27b1466d0b8f0c8737b900cf5634c /engine.c
parentf0e3072b6c82907322cfdec40da3ec682dc7be0b (diff)
downloadopenttd-90e33aed225cf00a75185d731cad5ce1c3520559.tar.xz
(svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate
Diffstat (limited to 'engine.c')
-rw-r--r--engine.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/engine.c b/engine.c
index 4b2d0748c..306d6af99 100644
--- a/engine.c
+++ b/engine.c
@@ -761,7 +761,7 @@ static PlayerID GetBestPlayer(PlayerID pp)
do {
best_hist = -1;
- best_player = -1;
+ best_player = OWNER_SPECTATOR;
FOR_ALL_PLAYERS(p) {
if (p->is_active && p->block_preview == 0 && !HASBIT(mask, p->index) &&
p->old_economy[0].performance_history > best_hist) {
@@ -770,7 +770,7 @@ static PlayerID GetBestPlayer(PlayerID pp)
}
}
- if (best_player == (PlayerID)-1) return -1;
+ if (best_player == OWNER_SPECTATOR) return OWNER_SPECTATOR;
SETBIT(mask, best_player);
} while (--pp != 0);
@@ -797,7 +797,7 @@ void EnginesDailyLoop(void)
} else if (e->preview_player != 0xFF) {
PlayerID best_player = GetBestPlayer(e->preview_player);
- if (best_player == (PlayerID)-1) {
+ if (best_player == OWNER_SPECTATOR) {
e->preview_player = 0xFF;
continue;
}