mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-09 19:10:38 +00:00
(svn r8689) -Fix [FS#613] (r8619): crash when an old savegame had buoys on the northern edge of the map.
This commit is contained in:
parent
704c80f27e
commit
997534a5ea
@ -1776,6 +1776,15 @@ bool AfterLoadGame(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Buoys do now store the owner of the previous water tile, which can never
|
||||
* be OWNER_NONE. So replace OWNER_NONE with OWNER_WATER. */
|
||||
if (CheckSavegameVersion(46)) {
|
||||
Station *st;
|
||||
FOR_ALL_STATIONS(st) {
|
||||
if (st->IsBuoy() && IsTileOwner(st->xy, OWNER_NONE)) SetTileOwner(st->xy, OWNER_WATER);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user