summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-26 21:45:16 +0000
committerrubidium <rubidium@openttd.org>2007-05-26 21:45:16 +0000
commit54d7cb8f7cb4ef522dfc694de0c68272930ffd90 (patch)
tree8896fa4fd939cfde5b6faeb5ce3a151e674fd530
parentac4a26c705160ebf28b1cab53f740f87cbd9c511 (diff)
downloadopenttd-54d7cb8f7cb4ef522dfc694de0c68272930ffd90.tar.xz
(svn r9945) -Fix: bridges were not properly marked dirty when adding/removing roadtypes.
-rw-r--r--src/road_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index f93a6d9db..be56d7821 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -171,7 +171,7 @@ int32 CmdRemoveRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (IsBridge(tile)) {
TileIndexDiff delta = TileOffsByDiagDir(GetBridgeRampDirection(tile));
- for (TileIndex t = tile; tile != other_end; tile += delta) MarkTileDirtyByTile(t);
+ for (TileIndex t = tile + delta; t != other_end; t += delta) MarkTileDirtyByTile(t);
}
}
} else {
@@ -475,7 +475,7 @@ do_clear:;
if (IsBridge(tile)) {
TileIndexDiff delta = TileOffsByDiagDir(GetBridgeRampDirection(tile));
- for (TileIndex t = tile + delta; tile != other_end; tile += delta) MarkTileDirtyByTile(t);
+ for (TileIndex t = tile + delta; t != other_end; t += delta) MarkTileDirtyByTile(t);
}
} break;