(svn r10221) -Fix: the one way sprites weren't drawn in the correct order, so they could remove the tramtrack in some cases.
authorrubidium
Tue, 19 Jun 2007 15:56:03 +0000
changeset 7461 f9c5dc7f2476
parent 7460 46c24d1287cf
child 7462 08e10afded56
(svn r10221) -Fix: the one way sprites weren't drawn in the correct order, so they could remove the tramtrack in some cases.
src/road_cmd.cpp
--- a/src/road_cmd.cpp	Tue Jun 19 15:40:27 2007 +0000
+++ b/src/road_cmd.cpp	Tue Jun 19 15:56:03 2007 +0000
@@ -992,13 +992,6 @@
 
 	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 @@
 		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);