mirror of https://github.com/OpenTTD/OpenTTD
(svn r5772) Road depots always have an player as owner, so remove an useless check
parent
635bfcd1c8
commit
6d468df6d9
14
road_cmd.c
14
road_cmd.c
|
@ -783,15 +783,12 @@ static void DrawTile_Road(TileInfo *ti)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case ROAD_TILE_DEPOT: {
|
case ROAD_TILE_DEPOT: {
|
||||||
uint32 ormod;
|
|
||||||
PlayerID player;
|
|
||||||
const DrawRoadSeqStruct* drss;
|
const DrawRoadSeqStruct* drss;
|
||||||
|
uint32 palette;
|
||||||
|
|
||||||
if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
|
if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
|
||||||
|
|
||||||
ormod = PALETTE_TO_GREY; //was this a bug/problem?
|
palette = PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile));
|
||||||
player = GetTileOwner(ti->tile);
|
|
||||||
if (player < MAX_PLAYERS) ormod = PLAYER_SPRITE_COLOR(player);
|
|
||||||
|
|
||||||
drss = _road_depot[GetRoadDepotDirection(ti->tile)];
|
drss = _road_depot[GetRoadDepotDirection(ti->tile)];
|
||||||
|
|
||||||
|
@ -800,8 +797,11 @@ static void DrawTile_Road(TileInfo *ti)
|
||||||
for (; drss->image != 0; drss++) {
|
for (; drss->image != 0; drss++) {
|
||||||
uint32 image = drss->image;
|
uint32 image = drss->image;
|
||||||
|
|
||||||
if (image & PALETTE_MODIFIER_COLOR) image |= ormod;
|
if (_display_opt & DO_TRANS_BUILDINGS) {
|
||||||
if (_display_opt & DO_TRANS_BUILDINGS) MAKE_TRANSPARENT(image);
|
MAKE_TRANSPARENT(image);
|
||||||
|
} else if (image & PALETTE_MODIFIER_COLOR) {
|
||||||
|
image |= palette;
|
||||||
|
}
|
||||||
|
|
||||||
AddSortableSpriteToDraw(
|
AddSortableSpriteToDraw(
|
||||||
image, ti->x | drss->subcoord_x,
|
image, ti->x | drss->subcoord_x,
|
||||||
|
|
Loading…
Reference in New Issue