summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-01 17:58:43 +0000
committerrubidium <rubidium@openttd.org>2007-06-01 17:58:43 +0000
commit31ddab50ada1fb266698b3b7b4d889acb403ac35 (patch)
tree205fd918c9ee9f968a039ae93fd2d5bbc59e3720 /src
parent7bf841ebd17f52ce3a266f45f68a40bb24085317 (diff)
downloadopenttd-31ddab50ada1fb266698b3b7b4d889acb403ac35.tar.xz
(svn r10014) -Fix: roads became automatically one way in the scenario editor.
Diffstat (limited to 'src')
-rw-r--r--src/road_map.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/road_map.h b/src/road_map.h
index 032febed6..8fe860707 100644
--- a/src/road_map.h
+++ b/src/road_map.h
@@ -123,8 +123,6 @@ static inline void SetRoadOwner(TileIndex t, RoadType rt, Owner o)
switch (rt) {
default: NOT_REACHED();
case ROADTYPE_ROAD: SB( _m[t].m1, 0, 5, o); break;
- /* Trams don't need OWNER_TOWN, and remapping OWNER_NONE
- * to OWNER_TOWN makes it use one bit less */
case ROADTYPE_TRAM: SB( _m[t].m5, 0, 4, o == OWNER_NONE ? OWNER_TOWN : o); break;
case ROADTYPE_HWAY: SB(_me[t].m7, 0, 5, o); break;
}
@@ -314,7 +312,8 @@ static inline void MakeRoadNormal(TileIndex t, RoadBits bits, RoadTypes rot, Tow
_m[t].m2 = town;
_m[t].m3 = 0;
_m[t].m4 = (HASBIT(rot, ROADTYPE_TRAM) ? bits : 0) << 4 | (HASBIT(rot, ROADTYPE_ROAD) ? bits : 0);
- _m[t].m5 = ROAD_TILE_NORMAL << 6 | tram;
+ _m[t].m5 = ROAD_TILE_NORMAL << 6;
+ SetRoadOwner(t, ROADTYPE_TRAM, tram);
SB(_m[t].m6, 2, 4, HASBIT(rot, ROADTYPE_HWAY) ? bits : 0);
_me[t].m7 = rot << 5 | hway;
}
@@ -327,7 +326,8 @@ static inline void MakeRoadCrossing(TileIndex t, Owner road, Owner tram, Owner h
_m[t].m2 = town;
_m[t].m3 = rat;
_m[t].m4 = roaddir << 6 | road;
- _m[t].m5 = ROAD_TILE_CROSSING << 6 | tram;
+ _m[t].m5 = ROAD_TILE_CROSSING << 6;
+ SetRoadOwner(t, ROADTYPE_TRAM, tram);
SB(_m[t].m6, 2, 4, 0);
_me[t].m7 = rot << 5 | hway;
}