summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-05-03 00:11:30 +0000
committermatthijs <matthijs@openttd.org>2005-05-03 00:11:30 +0000
commitb22ebeda61bebbc73a68a9284d0e411c444e0279 (patch)
tree4cee96412ed4276ac1f3c10f074a7d37252c6bae
parent6eb094c72622b39bceff8293c3446e57d21c62f0 (diff)
downloadopenttd-b22ebeda61bebbc73a68a9284d0e411c444e0279.tar.xz
(svn r2257) - Fix: [NPF] NPF debug markings modify _map2 instead of _map3_hi for street tiles, corrupting them.
Some info got moved around in r1768 for street tiles, but NPF did not get updated.
-rw-r--r--npf.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/npf.c b/npf.c
index 31dc31fb4..2d3ac2132 100644
--- a/npf.c
+++ b/npf.c
@@ -259,11 +259,18 @@ void NPFMarkTile(TileIndex tile) {
if (_debug_npf_level >= 1)
switch(GetTileType(tile)) {
case MP_RAILWAY:
- case MP_STREET:
/* DEBUG: mark visited tiles by mowing the grass under them
* ;-) */
- _map2[tile] &= ~15;
- MarkTileDirtyByTile(tile);
+ if (!IsTileDepotType(tile, TRANSPORT_RAIL)) {
+ _map2[tile] &= ~15; /* Clear bits 0-3 */
+ MarkTileDirtyByTile(tile);
+ }
+ break;
+ case MP_STREET:
+ if (!IsTileDepotType(tile, TRANSPORT_ROAD)) {
+ _map3_hi[tile] &= ~0x70; /* Clear bits 4-6 */
+ MarkTileDirtyByTile(tile);
+ }
break;
default:
break;