(svn r10883) [NewGRF_ports] -Fix: crashing aircraft caused deadlocking of the airport; they didn't release their owned blocks when the aircraft was finally destroyed.
--- a/src/aircraft_cmd.cpp Mon Aug 13 20:18:47 2007 +0000
+++ b/src/aircraft_cmd.cpp Mon Aug 13 20:45:50 2007 +0000
@@ -1310,16 +1310,10 @@
EV_EXPLOSION_SMALL);
}
} else if (v->u.air.crashed_counter >= 10000) {
- /* remove rubble of crashed airplane */
+ /* Remove rubble of crashed airplane */
- /* clear runway-in on all airports, set by crashing plane
- * small airports use AIRPORT_BUSY, city airports use RUNWAY_IN_OUT_block, etc.
- * but they all share the same number */
-
- //TODO: decide how to handle for custom airports
- //CLRBITS(st->airport_flags, RUNWAY_IN_block);
- //CLRBITS(st->airport_flags, RUNWAY_IN_OUT_block); // commuter airport
- //CLRBITS(st->airport_flags, RUNWAY_IN2_block); // intercontinental
+ /* Clear all claimed blocks on the airport set by crashing plane */
+ st->airport_flags.ReleaseBlocks(&v->u.air.owned_blocks);
BeginVehicleMove(v);
EndVehicleMove(v);