diff options
author | tron <tron@openttd.org> | 2005-06-04 11:56:32 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-06-04 11:56:32 +0000 |
commit | 0c4ecbe9ece42d071a4f4e4b6d506be32030cb4c (patch) | |
tree | 172ef15bca6626b797fbf586a043a978ee884141 /station_cmd.c | |
parent | 19e2b40a788cc175f35e4ca0cec0f439bd46ab76 (diff) | |
download | openttd-0c4ecbe9ece42d071a4f4e4b6d506be32030cb4c.tar.xz |
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
Diffstat (limited to 'station_cmd.c')
-rw-r--r-- | station_cmd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/station_cmd.c b/station_cmd.c index c01cb64e9..1721e38e0 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -2103,7 +2103,7 @@ static void DrawTile_Station(TileInfo *ti) uint32 relocation = 0; { - uint owner = _map_owner[ti->tile]; + uint owner = GetTileOwner(ti->tile); image_or_modificator = 0x315 << 16; /* NOTE: possible bug in ttd here? */ if (owner < MAX_PLAYERS) image_or_modificator = PLAYER_SPRITE_COLOR(owner); @@ -2204,7 +2204,7 @@ static void GetTileDesc_Station(uint tile, TileDesc *td) byte m5; StringID str; - td->owner = _map_owner[tile]; + td->owner = GetTileOwner(tile); td->build_date = GetStation(_map2[tile])->build_date; m5 = _map5[tile]; @@ -2880,8 +2880,7 @@ void DeleteOilRig(uint tile) static void ChangeTileOwner_Station(uint tile, byte old_player, byte new_player) { - if (_map_owner[tile] != old_player) - return; + if (!IsTileOwner(tile, old_player)) return; if (new_player != 255) { Station *st = GetStation(_map2[tile]); |