Fix crash when loading old savegames with buoys
This commit is contained in:
@@ -1025,9 +1025,13 @@ bool AfterLoadGame()
|
|||||||
if (IsOilRig(st->dock_station.tile)) {
|
if (IsOilRig(st->dock_station.tile)) {
|
||||||
/* Set dock station tile to dest tile instead of station. */
|
/* Set dock station tile to dest tile instead of station. */
|
||||||
st->docks = new Dock(st->dock_station.tile, st->dock_station.tile + ToTileIndexDiff({ 1, 0 }));
|
st->docks = new Dock(st->dock_station.tile, st->dock_station.tile + ToTileIndexDiff({ 1, 0 }));
|
||||||
}
|
} else if (IsDock(st->dock_station.tile)) {
|
||||||
else { /* A normal two-tiles dock. */
|
/* A normal two-tiles dock. */
|
||||||
st->docks = new Dock(st->dock_station.tile, TileAddByDiagDir(st->dock_station.tile, GetDockDirection(st->dock_station.tile)));
|
st->docks = new Dock(st->dock_station.tile, TileAddByDiagDir(st->dock_station.tile, GetDockDirection(st->dock_station.tile)));
|
||||||
|
} else if (IsBuoy(st->dock_station.tile)) {
|
||||||
|
/* A buoy. */
|
||||||
|
} else {
|
||||||
|
NOT_REACHED();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user