diff options
author | tron <tron@openttd.org> | 2006-08-05 16:57:39 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-08-05 16:57:39 +0000 |
commit | d90057e393992df0c7fa8c2ef20ebcafdc416c27 (patch) | |
tree | 51315413f3db4e32f2487ebc6b69d1da838f5aaf | |
parent | 24ae7a2241a6fb14dd960db1096ebdd8b45b913d (diff) | |
download | openttd-d90057e393992df0c7fa8c2ef20ebcafdc416c27.tar.xz |
(svn r5772) Road depots always have an player as owner, so remove an useless check
-rw-r--r-- | road_cmd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/road_cmd.c b/road_cmd.c index 6dd97dbea..4328aa277 100644 --- a/road_cmd.c +++ b/road_cmd.c @@ -783,15 +783,12 @@ static void DrawTile_Road(TileInfo *ti) default: case ROAD_TILE_DEPOT: { - uint32 ormod; - PlayerID player; const DrawRoadSeqStruct* drss; + uint32 palette; if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh); - ormod = PALETTE_TO_GREY; //was this a bug/problem? - player = GetTileOwner(ti->tile); - if (player < MAX_PLAYERS) ormod = PLAYER_SPRITE_COLOR(player); + palette = PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)); drss = _road_depot[GetRoadDepotDirection(ti->tile)]; @@ -800,8 +797,11 @@ static void DrawTile_Road(TileInfo *ti) for (; drss->image != 0; drss++) { uint32 image = drss->image; - if (image & PALETTE_MODIFIER_COLOR) image |= ormod; - if (_display_opt & DO_TRANS_BUILDINGS) MAKE_TRANSPARENT(image); + if (_display_opt & DO_TRANS_BUILDINGS) { + MAKE_TRANSPARENT(image); + } else if (image & PALETTE_MODIFIER_COLOR) { + image |= palette; + } AddSortableSpriteToDraw( image, ti->x | drss->subcoord_x, |