summaryrefslogtreecommitdiff
path: root/engine.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-18 11:23:58 +0000
committertron <tron@openttd.org>2005-10-18 11:23:58 +0000
commitf3de17256046ed3286ba17d130c7701a8729ac16 (patch)
tree000f00442c2db76662d897b20b8ca8d16bb0a4ba /engine.c
parentd4752ba0da4c6387020167b3acee938ed14d9a66 (diff)
downloadopenttd-f3de17256046ed3286ba17d130c7701a8729ac16.tar.xz
(svn r3059) Use bitfields to encode railtype and climates of engines instead of manual shifting/anding
Diffstat (limited to 'engine.c')
-rw-r--r--engine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine.c b/engine.c
index b2f369d01..2825c7c9f 100644
--- a/engine.c
+++ b/engine.c
@@ -183,7 +183,7 @@ void StartupEngines(void)
uint32 r;
e->age = 0;
- e->railtype = ei->railtype_climates >> 4;
+ e->railtype = ei->railtype;
e->flags = 0;
e->player_avail = 0;
@@ -217,7 +217,7 @@ void StartupEngines(void)
e->lifelength = ei->lifelength + _patches.extend_vehicle_life;
// prevent certain engines from ever appearing.
- if (!HASBIT(ei->railtype_climates, _opt.landscape)) {
+ if (!HASBIT(ei->climates, _opt.landscape)) {
e->flags |= ENGINE_AVAILABLE;
e->player_avail = 0;
}