(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.
This commit is contained in:
		
							
								
								
									
										11
									
								
								npf.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								npf.c
									
									
									
									
									
								
							| @@ -259,11 +259,18 @@ void NPFMarkTile(TileIndex tile) { | |||||||
| 	if (_debug_npf_level >= 1) | 	if (_debug_npf_level >= 1) | ||||||
| 		switch(GetTileType(tile)) { | 		switch(GetTileType(tile)) { | ||||||
| 			case MP_RAILWAY: | 			case MP_RAILWAY: | ||||||
| 			case MP_STREET: |  | ||||||
| 				/* DEBUG: mark visited tiles by mowing the grass under them | 				/* DEBUG: mark visited tiles by mowing the grass under them | ||||||
| 				 * ;-) */ | 				 * ;-) */ | ||||||
| 				_map2[tile] &= ~15; | 				if (!IsTileDepotType(tile, TRANSPORT_RAIL)) { | ||||||
|  | 					_map2[tile] &= ~15; /* Clear bits 0-3 */ | ||||||
| 					MarkTileDirtyByTile(tile); | 					MarkTileDirtyByTile(tile); | ||||||
|  | 				} | ||||||
|  | 				break; | ||||||
|  | 			case MP_STREET: | ||||||
|  | 				if (!IsTileDepotType(tile, TRANSPORT_ROAD)) { | ||||||
|  | 					_map3_hi[tile] &= ~0x70; /* Clear bits 4-6 */ | ||||||
|  | 					MarkTileDirtyByTile(tile); | ||||||
|  | 				} | ||||||
| 				break; | 				break; | ||||||
| 			default: | 			default: | ||||||
| 				break; | 				break; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 matthijs
					matthijs