summaryrefslogtreecommitdiff
path: root/ttd.c
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2005-01-25 15:38:36 +0000
committerdominik <dominik@openttd.org>2005-01-25 15:38:36 +0000
commit85e768c11fde72c56425ae3438c5d7dba820b8ab (patch)
tree7e95f59e35354d3577e4d77bd75a70d6b754d706 /ttd.c
parentde649779572f23b0b8ee840941a8389fe156e634 (diff)
downloadopenttd-85e768c11fde72c56425ae3438c5d7dba820b8ab.tar.xz
(svn r1667) - Feature: Signs are now shown in the color of the player who created them
(Note: The player information is currently not stored in savegames. Upon loading a game the signs will all be gray again)
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