Tracerestrict: Add a group membership conditional.

This commit is contained in:
Jonathan G Rennison
2016-04-05 18:40:16 +01:00
parent 4d94470d08
commit 213b0e7e3a
6 changed files with 170 additions and 26 deletions

View File

@@ -21,6 +21,7 @@
#include "company_func.h"
#include "core/pool_func.hpp"
#include "order_backup.h"
#include "tracerestrict.h"
#include "table/strings.h"
@@ -341,6 +342,9 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
VehicleType vt = g->vehicle_type;
/* notify tracerestrict that group is about to be deleted */
TraceRestrictRemoveGroupID(g->index);
/* Delete the Replace Vehicle Windows */
DeleteWindowById(WC_REPLACE_VEHICLE, g->vehicle_type);
delete g;