(svn r12100) -Fix (r12042): check for water class of surrounding tiles fails for buoys at map borders
This commit is contained in:
@@ -2364,6 +2364,12 @@ bool AfterLoadGame()
|
||||
|
||||
if (CheckSavegameVersion(87)) {
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (!IsTileType(t, MP_VOID) && (TileX(t) == 0 || TileY(t) == 0 || TileX(t) == MapMaxX() || TileY(t) == MapMaxY())) {
|
||||
/* Some version 86 savegames have wrong water class at map borders (under buoy, or after removing buoy).
|
||||
* This conversion has to be done before buoys with invalid owner are removed. */
|
||||
SetWaterClass(t, WATER_CLASS_SEA);
|
||||
}
|
||||
|
||||
if (IsBuoyTile(t) || IsDriveThroughStopTile(t) || IsTileType(t, MP_WATER)) {
|
||||
Owner o = GetTileOwner(t);
|
||||
if (IsValidPlayer(o) && !GetPlayer(o)->is_active) {
|
||||
|
Reference in New Issue
Block a user