summaryrefslogtreecommitdiff
path: root/ttd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ttd.c')
-rw-r--r--ttd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ttd.c b/ttd.c
index 70e8e6722..f86c00e27 100644
--- a/ttd.c
+++ b/ttd.c
@@ -1269,6 +1269,15 @@ static void UpdateVoidTiles(void)
memset(_map_type_and_height + MapMaxY() * MapSizeX(), MP_VOID << 4, MapSizeX());
}
+// since savegame version 6.0 each sign has an "owner", signs without owner (from old games are set to 255)
+static void UpdateSignOwner(void)
+{
+ SignStruct *ss;
+ FOR_ALL_SIGNS(ss) {
+ ss->owner = OWNER_NONE; // no owner
+ }
+}
+
extern void UpdateOldAircraft( void );
extern void UpdateOilRig( void );
@@ -1292,6 +1301,11 @@ bool AfterLoadGame(uint version)
UpdateCurrencies();
}
+ // from version 6.0 of the savegame, signs have an "owner"
+ if (version <= 0x600) {
+ UpdateSignOwner();
+ }
+
/* In old version there seems to be a problem that water is owned by
OWNER_NONE, not OWNER_WATER.. I can't replicate it for the current
(0x402) version, so I just check when versions are older, and then