diff options
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index f08a613a4..61beff3bf 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -2014,10 +2014,14 @@ default_waypoint: image += relocation; } - if (!(!HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_BUILDINGS)) && HasBit(image, PALETTE_MODIFIER_COLOR)) { - pal = _drawtile_track_palette; + if (HasBit(image, PALETTE_MODIFIER_TRANSPARENT) || HasBit(image, PALETTE_MODIFIER_COLOR)) { + if (dtss->image.pal != 0) { + pal = dtss->image.pal; + } else { + pal = _drawtile_track_palette; + } } else { - pal = dtss->image.pal; + pal = PAL_NONE; } if ((byte)dtss->delta_z != 0x80) { @@ -2029,7 +2033,8 @@ default_waypoint: !HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_BUILDINGS) ); } else { - AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y); + /* For stations and original spritelayouts delta_x and delta_y are signed */ + AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y, !HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_BUILDINGS)); } } } |