(svn r21940) -Fix [FS#4460]: Not all vehicles should be tested to be inside a tunnel upon savegame load (SmatZ)

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
planetmaker 14 years ago
parent b15719bbd2
commit 0364726bbb

@ -2377,6 +2377,10 @@ bool AfterLoadGame()
* get messed up just after loading the savegame. This fixes that. */
Vehicle *v;
FOR_ALL_VEHICLES(v) {
/* Not all vehicle types can be inside a tunnel. Furthermore,
* testing IsTunnelTile() for invalid tiles causes a crash. */
if (!v->IsGroundVehicle()) continue;
/* Is the vehicle in a tunnel? */
if (!IsTunnelTile(v->tile)) continue;

Loading…
Cancel
Save