mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
(svn r21940) -Fix [FS#4460]: Not all vehicles should be tested to be inside a tunnel upon savegame load (SmatZ)
This commit is contained in:
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…
Reference in New Issue
Block a user