From 9060ab4af1e3e39bb43374af655c476e26307a39 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 25 May 2007 08:47:40 +0000 Subject: (svn r9918) -Fix: the available roadtypes/railtypes were not updated on GRF updates. --- src/engine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/engine.cpp') 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); } -- cgit v1.2.3-54-g00ecf