mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r11056) -Fix [FS#1213]: road/tram tiles would not always get marked dirty properly, causing glitches for non-local players. Patch by SmatZ.
This commit is contained in:
parent
a208f83e8b
commit
c25655d4ae
|
@ -198,10 +198,12 @@ CommandCost CmdRemoveRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue