summaryrefslogtreecommitdiff
path: root/src/rail_map.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-03-08 16:10:39 +0000
committersmatz <smatz@openttd.org>2009-03-08 16:10:39 +0000
commite124aa8fd62f3260d2a127aab1e9bc6f5a303480 (patch)
tree093e5d2cab6ed85f891e85bb8d9947464dbc8706 /src/rail_map.h
parent7c8474da13d295ddb6224fe66c41e4ba4ac0f050 (diff)
downloadopenttd-e124aa8fd62f3260d2a127aab1e9bc6f5a303480.tar.xz
(svn r15643) -Fix [FS#2711]: be more strict with zeroing unused map array bits
Diffstat (limited to 'src/rail_map.h')
-rw-r--r--src/rail_map.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rail_map.h b/src/rail_map.h
index a6077cf0d..7c8c31f85 100644
--- a/src/rail_map.h
+++ b/src/rail_map.h
@@ -607,6 +607,8 @@ static inline void MakeRailNormal(TileIndex t, Owner o, TrackBits b, RailType r)
_m[t].m3 = r;
_m[t].m4 = 0;
_m[t].m5 = RAIL_TILE_NORMAL << 6 | b;
+ SB(_m[t].m6, 2, 4, 0);
+ _me[t].m7 = 0;
}
@@ -618,6 +620,8 @@ static inline void MakeRailDepot(TileIndex t, Owner o, DiagDirection d, RailType
_m[t].m3 = r;
_m[t].m4 = 0;
_m[t].m5 = RAIL_TILE_DEPOT << 6 | d;
+ SB(_m[t].m6, 2, 4, 0);
+ _me[t].m7 = 0;
}
@@ -629,6 +633,8 @@ static inline void MakeRailWaypoint(TileIndex t, Owner o, Axis a, RailType r, ui
_m[t].m3 = r;
_m[t].m4 = 0;
_m[t].m5 = RAIL_TILE_WAYPOINT << 6 | a;
+ SB(_m[t].m6, 2, 4, 0);
+ _me[t].m7 = 0;
}
#endif /* RAIL_MAP_H */