mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-23 13:12:40 +01:00
(svn r10841) [0.5] -Backport from trunk (r10835, r10593, r10500, r10497, r10410, r10357, r10199):
- Fix: [Windows] Do not try to minimise or restore the window when closing OpenTTD [FS#998] (r10835) - Fix: One could not remove locks that were build in a (very) old version of OpenTTD [FS#1038] (r10593) - Fix: One cannot navigate using arrow keys in the game name text box [FS#1038] (r10500) - Fix: Ship's maximum speed wrongly shown [FS#1013] (r10497) - Fix: [OSX] Of the resolution is changed to something that is too high for the monitor, then it is reduced to fit the monitor size, solving several crashes and graphical glitches [FS#458] (r10410) - Fix: NPF was leaking memory each time it got initialized, except for the first time (r10357) - Fix: [YAPF] 'target_seen' flag that is set prematurely in some cases (1 tile long cached segment followed by target station) which caused asserts to trigger [FS#884] (r10199)
This commit is contained in:
10
openttd.c
10
openttd.c
@@ -25,6 +25,7 @@
|
||||
#include "station_map.h"
|
||||
#include "town_map.h"
|
||||
#include "tunnel_map.h"
|
||||
#include "water_map.h"
|
||||
#include "vehicle.h"
|
||||
#include "viewport.h"
|
||||
#include "window.h"
|
||||
@@ -1615,10 +1616,19 @@ 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)) {
|
||||
TileIndex t;
|
||||
Station *st;
|
||||
FOR_ALL_STATIONS(st) {
|
||||
if (IsBuoy(st) && IsTileOwner(st->xy, OWNER_NONE)) SetTileOwner(st->xy, OWNER_WATER);
|
||||
}
|
||||
|
||||
/* Locks/shiplifts in very old savegames had OWNER_WATER as owner */
|
||||
for (t = 0; t < MapSize(); t++) {
|
||||
if (IsTileType(t, MP_WATER) && GetWaterTileType(t) == WATER_LOCK &&
|
||||
GetTileOwner(t) == OWNER_WATER) {
|
||||
SetTileOwner(t, OWNER_NONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CheckSavegameVersion(7)) {
|
||||
|
||||
Reference in New Issue
Block a user