(svn r11864) -Codechange: pass owner whose signals we will update instead of complex detection later

This commit is contained in:
smatz
2008-01-15 15:00:01 +00:00
parent 932c586dfe
commit 245f05a7cc
9 changed files with 72 additions and 56 deletions

View File

@@ -286,6 +286,7 @@ CommandCost RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
if (flags & DC_EXEC) {
Track track = GetRailWaypointTrack(tile);
Owner owner = GetTileOwner(tile); // cannot use _current_player because of possible floods
wp = GetWaypointByTile(tile);
wp->deleted = 30; // let it live for this many days before we do the actual deletion.
@@ -296,7 +297,7 @@ CommandCost RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
MarkTileDirtyByTile(tile);
} else {
DoClearSquare(tile);
SetSignalsOnBothDir(tile, track);
SetSignalsOnBothDir(tile, track, owner);
}
YapfNotifyTrackLayoutChange(tile, track);
}