(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)
This commit is contained in:
dominik
2005-01-25 15:38:36 +00:00
parent de64977957
commit 85e768c11f
6 changed files with 29 additions and 7 deletions

14
ttd.c
View File

@@ -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