(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:
rubidium
2010-08-18 18:52:16 +00:00
parent e242294530
commit 019878118d
6 changed files with 42 additions and 25 deletions

View File

@@ -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);