summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2006-12-20 23:41:24 +0000
committerKUDr <kudr@openttd.org>2006-12-20 23:41:24 +0000
commit0bf22bdedf09e3253104ea7f49956aa7ed2de486 (patch)
treef13a7894250d851d9c58c43ab8c1ea77e4147c64
parent28042b65ac4574a3bcf3fa2ff206e62f498492b2 (diff)
downloadopenttd-0bf22bdedf09e3253104ea7f49956aa7ed2de486.tar.xz
(svn r7519) -Fix: [YAPF] Cache was not deleted when waypoint was built or removed (frosch)
-rw-r--r--waypoint.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/waypoint.c b/waypoint.c
index 499faa3a1..64d508b92 100644
--- a/waypoint.c
+++ b/waypoint.c
@@ -244,6 +244,7 @@ int32 CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
UpdateWaypointSign(wp);
RedrawWaypointSign(wp);
+ YapfNotifyTrackLayoutChange(tile, AxisToTrack(axis));
}
return _price.build_train_depot;
@@ -274,6 +275,7 @@ int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
}
if (flags & DC_EXEC) {
+ Track track = GetRailWaypointTrack(tile);
wp = GetWaypointByTile(tile);
wp->deleted = 30; // let it live for this many days before we do the actual deletion.
@@ -284,9 +286,9 @@ int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
MarkTileDirtyByTile(tile);
} else {
DoClearSquare(tile);
- SetSignalsOnBothDir(tile, GetRailWaypointTrack(tile));
- YapfNotifyTrackLayoutChange(tile, GetRailWaypointTrack(tile));
+ SetSignalsOnBothDir(tile, track);
}
+ YapfNotifyTrackLayoutChange(tile, track);
}
return _price.remove_train_depot;