(svn r20545) -Codechange: make sure an OrderBackup gets cleared when the depot it belongs to gets removed, the depot window gets closed or when another vehicle gets sold in a depot
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include "newgrf.h"
|
||||
#include "table/airporttile_ids.h"
|
||||
#include "newgrf_airporttiles.h"
|
||||
#include "order_backup.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -2287,6 +2288,7 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags)
|
||||
cost.AddCost(_price[PR_CLEAR_STATION_AIRPORT]);
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
if (IsHangarTile(tile_cur)) OrderBackup::Reset(tile_cur);
|
||||
DeleteAnimatedTile(tile_cur);
|
||||
DoClearSquare(tile_cur);
|
||||
DeleteNewGRFInspectWindow(GSF_AIRPORTTILES, tile_cur);
|
||||
|
Reference in New Issue
Block a user