Merge branch 'master' into jgrpp
# Conflicts: # src/signs_cmd.cpp # src/station.cpp # src/station_cmd.cpp # src/town_cmd.cpp # src/viewport.cpp # src/waypoint.cpp # src/waypoint_cmd.cpp
This commit is contained in:
@@ -49,26 +49,11 @@ void Waypoint::GetTileArea(TileArea *ta, StationType type) const
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Move the waypoint main coordinate somewhere else.
|
||||
* @param new_xy new tile location of the sign
|
||||
*/
|
||||
void Waypoint::MoveSign(TileIndex new_xy)
|
||||
{
|
||||
if (this->xy == new_xy) return;
|
||||
|
||||
if (_viewport_sign_kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index, this->viewport_sign_kdtree_pt));
|
||||
|
||||
this->BaseStation::MoveSign(new_xy);
|
||||
|
||||
if (_viewport_sign_kdtree_valid) _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeWaypoint(this->index));
|
||||
}
|
||||
|
||||
Waypoint::~Waypoint()
|
||||
{
|
||||
if (CleaningPool()) return;
|
||||
DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
|
||||
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
|
||||
if (_viewport_sign_kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index, this->viewport_sign_kdtree_pt));
|
||||
if (_viewport_sign_kdtree_valid && this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index));
|
||||
TraceRestrictRemoveDestinationID(TROCAF_WAYPOINT, this->index);
|
||||
}
|
||||
|
Reference in New Issue
Block a user