summaryrefslogtreecommitdiff
path: root/src/road_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-19 15:56:03 +0000
committerrubidium <rubidium@openttd.org>2007-06-19 15:56:03 +0000
commit911f37ee9482df2c344f35af58549e95cac736d2 (patch)
treedab563fdc5b2d7053dd93f0754d15cd0816626e6 /src/road_cmd.cpp
parent766168ad4322d74ce9d51fe6b68e2a3d35f9feae (diff)
downloadopenttd-911f37ee9482df2c344f35af58549e95cac736d2.tar.xz
(svn r10221) -Fix: the one way sprites weren't drawn in the correct order, so they could remove the tramtrack in some cases.
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r--src/road_cmd.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 59ffe28bb..78f763cdb 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -992,13 +992,6 @@ static void DrawRoadBits(TileInfo* ti)
DrawGroundSprite(image, pal);
- if (road != ROAD_NONE) {
- DisallowedRoadDirections drd = GetDisallowedRoadDirections(ti->tile);
- if (drd != DRD_NONE) {
- DrawRoadDetail(SPR_ONEWAY_BASE + drd - 1 + ((road == ROAD_X) ? 0 : 3), ti, 8, 8, 0);
- }
- }
-
/* For tram we overlay the road graphics with either tram tracks only
* (when there is actual road beneath the trams) or with tram tracks
* and some dirts which hides the road graphics */
@@ -1012,6 +1005,13 @@ static void DrawRoadBits(TileInfo* ti)
DrawGroundSprite(image, pal);
}
+ if (road != ROAD_NONE) {
+ DisallowedRoadDirections drd = GetDisallowedRoadDirections(ti->tile);
+ if (drd != DRD_NONE) {
+ DrawRoadDetail(SPR_ONEWAY_BASE + drd - 1 + ((road == ROAD_X) ? 0 : 3), ti, 8, 8, 0);
+ }
+ }
+
if (HasRoadWorks(ti->tile)) {
/* Road works */
DrawGroundSprite((road | tram) & ROAD_X ? SPR_EXCAVATION_X : SPR_EXCAVATION_Y, PAL_NONE);