mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-23 04:16:50 +01:00
(svn r7519) -Fix: [YAPF] Cache was not deleted when waypoint was built or removed (frosch)
This commit is contained in:
parent
28042b65ac
commit
0bf22bdedf
@ -244,6 +244,7 @@ int32 CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
|
|
||||||
UpdateWaypointSign(wp);
|
UpdateWaypointSign(wp);
|
||||||
RedrawWaypointSign(wp);
|
RedrawWaypointSign(wp);
|
||||||
|
YapfNotifyTrackLayoutChange(tile, AxisToTrack(axis));
|
||||||
}
|
}
|
||||||
|
|
||||||
return _price.build_train_depot;
|
return _price.build_train_depot;
|
||||||
@ -274,6 +275,7 @@ int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
|
Track track = GetRailWaypointTrack(tile);
|
||||||
wp = GetWaypointByTile(tile);
|
wp = GetWaypointByTile(tile);
|
||||||
|
|
||||||
wp->deleted = 30; // let it live for this many days before we do the actual deletion.
|
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);
|
MarkTileDirtyByTile(tile);
|
||||||
} else {
|
} else {
|
||||||
DoClearSquare(tile);
|
DoClearSquare(tile);
|
||||||
SetSignalsOnBothDir(tile, GetRailWaypointTrack(tile));
|
SetSignalsOnBothDir(tile, track);
|
||||||
YapfNotifyTrackLayoutChange(tile, GetRailWaypointTrack(tile));
|
|
||||||
}
|
}
|
||||||
|
YapfNotifyTrackLayoutChange(tile, track);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _price.remove_train_depot;
|
return _price.remove_train_depot;
|
||||||
|
Loading…
Reference in New Issue
Block a user