Save point used when adding station to viewport kd tree, use for removal

This commit is contained in:
Jonathan G Rennison
2019-04-09 02:32:28 +01:00
parent 3807f0551d
commit 070160af40
7 changed files with 36 additions and 7 deletions

View File

@@ -56,6 +56,6 @@ 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));
if (_viewport_sign_kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index, this->viewport_sign_kdtree_pt));
TraceRestrictRemoveDestinationID(TROCAF_WAYPOINT, this->index);
}