summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-07-25 17:33:53 +0000
committerpeter1138 <peter1138@openttd.org>2008-07-25 17:33:53 +0000
commit7cdd6ef33c93abe307b69e0b73a83d5dba1df921 (patch)
tree0e99d8a02090e6fe873b12e61d26450f6b2122e0
parent64833bb84f0f0306464ebf3a4ad6049f56d2a977 (diff)
downloadopenttd-7cdd6ef33c93abe307b69e0b73a83d5dba1df921.tar.xz
(svn r13825) -Revert (r13821 partially): preview_player_rank wasn't a PlayerByte value in r12143, and still isn't a PlayerByte value.
-rw-r--r--src/engine.cpp4
-rw-r--r--src/engine_base.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index ab8aed61d..3808c46a8 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -342,11 +342,11 @@ void EnginesDailyLoop()
DeleteWindowById(WC_ENGINE_PREVIEW, i);
e->preview_player_rank++;
}
- } else if (e->preview_player_rank != PLAYER_SPECTATOR) {
+ } else if (e->preview_player_rank != 0xFF) {
PlayerID best_player = GetBestPlayer(e->preview_player_rank);
if (best_player == PLAYER_SPECTATOR) {
- e->preview_player_rank = PLAYER_SPECTATOR;
+ e->preview_player_rank = 0xFF;
continue;
}
diff --git a/src/engine_base.h b/src/engine_base.h
index 6c018b674..40ece643c 100644
--- a/src/engine_base.h
+++ b/src/engine_base.h
@@ -20,7 +20,7 @@ struct Engine : PoolItem<Engine, EngineID, &_Engine_pool> {
uint16 duration_phase_1, duration_phase_2, duration_phase_3;
byte lifelength;
byte flags;
- PlayerByte preview_player_rank;
+ uint8 preview_player_rank;
byte preview_wait;
PlayerMask player_avail;
uint8 image_index; ///< Original vehicle image index