diff options
author | dominik <dominik@openttd.org> | 2005-01-25 15:38:36 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2005-01-25 15:38:36 +0000 |
commit | d439221c62fb6dc95192c68659fd68e4a85f60a2 (patch) | |
tree | 7e95f59e35354d3577e4d77bd75a70d6b754d706 /ttd.c | |
parent | 03ba24dd6548e4d96e6090f6d18b7dbfdbb96bd8 (diff) | |
download | openttd-d439221c62fb6dc95192c68659fd68e4a85f60a2.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.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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 |