1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-23 22:49:09 +00:00

(svn r3059) Use bitfields to encode railtype and climates of engines instead of manual shifting/anding

This commit is contained in:
tron
2005-10-18 11:23:58 +00:00
parent d4752ba0da
commit f3de172560
5 changed files with 9 additions and 10 deletions

View File

@@ -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;
}