Changeset - r7536:851d38e350c3
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-09-07 21:17:01
rubidium@openttd.org
(svn r11056) -Fix [FS#1213]: road/tram tiles would not always get marked dirty properly, causing glitches for non-local players. Patch by SmatZ.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/road_cmd.cpp
Show inline comments
 
@@ -198,10 +198,12 @@ CommandCost CmdRemoveRoad(TileIndex tile
 
				if (present == ROAD_NONE) {
 
					RoadTypes rts = GetRoadTypes(tile) & ComplementRoadTypes(RoadTypeToRoadTypes(rt));
 
					if (rts == ROADTYPES_NONE) {
 
						/* Includes MarkTileDirtyByTile() */
 
						DoClearSquare(tile);
 
					} else {
 
						SetRoadBits(tile, ROAD_NONE, rt);
 
						SetRoadTypes(tile, rts);
 
						MarkTileDirtyByTile(tile);
 
					}
 
				} else {
 
					/* When bits are removed, you *always* end up with something that
0 comments (0 inline, 0 general)