Allow referencing waypoints in news items

This commit is contained in:
Jonathan G Rennison
2021-01-21 22:55:30 +00:00
parent ac6581ac8f
commit 01c051793c
2 changed files with 5 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
#include "viewport_kdtree.h"
#include "tracerestrict.h"
#include "newgrf_debug.h"
#include "news_func.h"
#include "safeguards.h"
@@ -58,4 +59,7 @@ Waypoint::~Waypoint()
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);
/* Remove all news items */
DeleteStationNews(this->index);
}