summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-25 08:47:40 +0000
committerrubidium <rubidium@openttd.org>2007-05-25 08:47:40 +0000
commit7ec428fe7e5e8ff82a8cd3c4cf2ff6eecb480063 (patch)
tree50597cfedb78228e87fdb5619378cb6467165a79 /src/engine.cpp
parent21546a66f3e3c1871ba6d7cd2dcef6148e1ecf21 (diff)
downloadopenttd-7ec428fe7e5e8ff82a8cd3c4cf2ff6eecb480063.tar.xz
(svn r9918) -Fix: the available roadtypes/railtypes were not updated on GRF updates.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 37067bdd2..80b07adca 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -332,6 +332,12 @@ static void NewVehicleAvailable(Engine *e)
if (p->is_active) SETBIT(p->avail_railtypes, railtype);
}
}
+ if ((index - NUM_TRAIN_ENGINES) < NUM_ROAD_ENGINES) {
+ /* maybe make another road type available */
+ FOR_ALL_PLAYERS(p) {
+ if (p->is_active) SETBIT(p->avail_roadtypes, HASBIT(EngInfo(index)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD);
+ }
+ }
AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_VEHICLEAVAIL), 0, 0);
}