Ensure the same coordinates are used for station/town/player signs regardless of how the landscape changes below it after the coordinates were first determined. By keeping track of whether each ViewportSign is valid for Kdtree use (and only ever registering the viewport sign when the object is valid) a lot of code can be simplified and become more robust at the same time.
This commit is contained in:

committed by
GitHub

parent
f91c701ffe
commit
9900af38f5
@@ -53,5 +53,5 @@ Waypoint::~Waypoint()
|
||||
if (CleaningPool()) return;
|
||||
DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
|
||||
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
|
||||
_viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index));
|
||||
if (this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index));
|
||||
}
|
||||
|
Reference in New Issue
Block a user