(svn r14182) -Fix: After applying NewGRF settings, all rail and road types were available as the engine availability check was performed too early.
authorpeter1138
Thu, 28 Aug 2008 19:53:25 +0000
changeset 10023 d200e056524c
parent 10022 942a737147c5
child 10024 2e00ada672d1
(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
src/newgrf.cpp
--- a/src/engine.cpp	Thu Aug 28 19:22:03 2008 +0000
+++ b/src/engine.cpp	Thu Aug 28 19:53:25 2008 +0000
@@ -279,6 +279,13 @@
 			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)
--- a/src/newgrf.cpp	Thu Aug 28 19:22:03 2008 +0000
+++ b/src/newgrf.cpp	Thu Aug 28 19:53:25 2008 +0000
@@ -6002,13 +6002,6 @@
 	}
 	_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();