summaryrefslogtreecommitdiff
path: root/src/clear_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/clear_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/clear_map.h')
-rw-r--r--src/clear_map.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/clear_map.h b/src/clear_map.h
index 98fd12034..f3459f0b1 100644
--- a/src/clear_map.h
+++ b/src/clear_map.h
@@ -238,8 +238,9 @@ static inline void MakeClear(TileIndex t, ClearGround g, uint density)
_m[t].m2 = 0;
_m[t].m3 = 0;
_m[t].m4 = 0 << 5 | 0 << 2;
- SetClearGroundDensity(t, g, density);
- SB(_m[t].m6, 2, 4, 0); // Clear the rest of m6, bits 2 to 5
+ SetClearGroundDensity(t, g, density); // Sets m5
+ SB(_m[t].m6, 2, 4, 0); // Other bits are "tropic zone" and "bridge above"
+ _me[t].m7 = 0;
}
@@ -257,6 +258,8 @@ static inline void MakeField(TileIndex t, uint field_type, IndustryID industry)
_m[t].m3 = field_type;
_m[t].m4 = 0 << 5 | 0 << 2;
SetClearGroundDensity(t, CLEAR_FIELDS, 3);
+ SB(_m[t].m6, 2, 4, 0);
+ _me[t].m7 = 0;
}
#endif /* CLEAR_MAP_H */