Add NewGRF debug window inspection for waypoints

This commit is contained in:
Jonathan G Rennison
2021-01-15 17:15:16 +00:00
parent 6a6d9f3773
commit fc012d4874
2 changed files with 13 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
#include "waypoint_base.h"
#include "viewport_kdtree.h"
#include "tracerestrict.h"
#include "newgrf_debug.h"
#include "safeguards.h"
@@ -53,6 +54,7 @@ Waypoint::~Waypoint()
{
if (CleaningPool()) return;
DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
DeleteNewGRFInspectWindow(GSF_FAKE_STATION_STRUCT, this->index);
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
if (_viewport_sign_kdtree_valid && this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index));
TraceRestrictRemoveDestinationID(TROCAF_WAYPOINT, this->index);