diff options
author | smatz <smatz@openttd.org> | 2009-03-08 16:10:39 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-03-08 16:10:39 +0000 |
commit | e57699d8c0eea4021e84e61e93455bdf47139dad (patch) | |
tree | 093e5d2cab6ed85f891e85bb8d9947464dbc8706 /src/clear_map.h | |
parent | f5b24edc1e33a43c6bd725482b9150f22414f2f2 (diff) | |
download | openttd-e57699d8c0eea4021e84e61e93455bdf47139dad.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.h | 7 |
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 */ |