mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
Move dock creation code in afterload further up so it runs before the catchment area is created, since that code checks for the presence of the new docks.
(cherry picked from commit 80cf10dc0788644ed844b313e5c73dc634f7b43a) # Conflicts: # src/saveload/afterload.cpp
This commit is contained in:
parent
e3b33b45c9
commit
06abeb4570
@ -1016,6 +1016,22 @@ bool AfterLoadGame()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsPatchPackSavegameVersionBefore(SL_PATCH_PACK_1_18)) {
|
||||||
|
/* Dock type has changed. */
|
||||||
|
Station *st;
|
||||||
|
FOR_ALL_STATIONS(st) {
|
||||||
|
if (st->dock_station.tile == INVALID_TILE) continue;
|
||||||
|
assert(Dock::CanAllocateItem());
|
||||||
|
if (IsOilRig(st->dock_station.tile)) {
|
||||||
|
/* 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 }));
|
||||||
|
}
|
||||||
|
else { /* A normal two-tiles dock. */
|
||||||
|
st->docks = new Dock(st->dock_station.tile, TileAddByDiagDir(st->dock_station.tile, GetDockDirection(st->dock_station.tile)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (TileIndex t = 0; t < map_size; t++) {
|
for (TileIndex t = 0; t < map_size; t++) {
|
||||||
switch (GetTileType(t)) {
|
switch (GetTileType(t)) {
|
||||||
case MP_STATION: {
|
case MP_STATION: {
|
||||||
@ -3344,21 +3360,6 @@ bool AfterLoadGame()
|
|||||||
FOR_ALL_STATIONS(st) UpdateStationAcceptance(st, false);
|
FOR_ALL_STATIONS(st) UpdateStationAcceptance(st, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsPatchPackSavegameVersionBefore(SL_PATCH_PACK_1_18)) {
|
|
||||||
/* Dock type has changed. */
|
|
||||||
Station *st;
|
|
||||||
FOR_ALL_STATIONS(st) {
|
|
||||||
if (st->dock_station.tile == INVALID_TILE) continue;
|
|
||||||
assert(Dock::CanAllocateItem());
|
|
||||||
if (IsOilRig(st->dock_station.tile)) {
|
|
||||||
/* 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}));
|
|
||||||
} else { /* A normal two-tiles dock. */
|
|
||||||
st->docks = new Dock(st->dock_station.tile, TileAddByDiagDir(st->dock_station.tile, GetDockDirection(st->dock_station.tile)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// setting moved from game settings to company settings
|
// setting moved from game settings to company settings
|
||||||
if (SlXvIsFeaturePresent(XSLFI_ORDER_OCCUPANCY, 1, 1)) {
|
if (SlXvIsFeaturePresent(XSLFI_ORDER_OCCUPANCY, 1, 1)) {
|
||||||
Company *c;
|
Company *c;
|
||||||
|
Loading…
Reference in New Issue
Block a user