(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

@@ -2373,7 +2373,6 @@ void CcBuildPrimaryVehicle(const CommandCost &result, TileIndex tile, uint32 p1,
if (result.Failed()) return;
const Vehicle *v = Vehicle::Get(_new_vehicle_id);
OrderBackup *ob = OrderBackup::GetByTile(v->tile);
if (ob != NULL) ob->RestoreTo(v);
OrderBackup::Restore(v);
ShowVehicleViewWindow(v);
}