From 80c9ecedcd2b16ff80011bd05fa57b7e98a583b4 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 28 Aug 2008 19:53:25 +0000 Subject: (svn r14182) -Fix: After applying NewGRF settings, all rail and road types were available as the engine availability check was performed too early. --- src/engine.cpp | 7 +++++++ src/newgrf.cpp | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/engine.cpp b/src/engine.cpp index 8f70f5109..ffc6c0176 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -279,6 +279,13 @@ void StartupEngines() e->player_avail = 0; } } + + /* Update the bitmasks for the vehicle lists */ + Player *p; + FOR_ALL_PLAYERS(p) { + p->avail_railtypes = GetPlayerRailtypes(p->index); + p->avail_roadtypes = GetPlayerRoadtypes(p->index); + } } static void AcceptEnginePreview(EngineID eid, PlayerID player) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index cd57977f0..2fc15c06a 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -6002,13 +6002,6 @@ static void AfterLoadGRFs() } _grf_line_to_action6_sprite_override.clear(); - /* Update the bitmasks for the vehicle lists */ - Player *p; - FOR_ALL_PLAYERS(p) { - p->avail_railtypes = GetPlayerRailtypes(p->index); - p->avail_roadtypes = GetPlayerRoadtypes(p->index); - } - /* Pre-calculate all refit masks after loading GRF files. */ CalculateRefitMasks(); -- cgit v1.2.3-70-g09d2