(svn r10901) [NewGRF_ports] -Fix: Aircraft that failed to exit the hangar should unreserve any terminal reservations they made.
--- a/src/aircraft_cmd.cpp Tue Aug 14 22:57:52 2007 +0000
+++ b/src/aircraft_cmd.cpp Tue Aug 14 23:41:36 2007 +0000
@@ -1636,7 +1636,14 @@
byte prev_pos = v->u.air.pos; // location could be changed in state, so save it before-hand
AirportMove(v, apc);
- if (v->u.air.pos != prev_pos) AircraftLeaveHangar(v); //only leave the hangar if we have succeeded in finding another position to move to
+ if (v->u.air.pos != prev_pos) {
+ AircraftLeaveHangar(v); //only leave the hangar if we have succeeded in finding another position to move to
+ } else {
+ /* release any reserved terminals */
+ Station *st = GetStation(v->u.air.targetairport);
+ st->airport_flags.ReleaseLowerBlocks(&v->u.air.owned_blocks);
+ v->u.air.owned_blocks.ReleaseLowerBlocks(&v->u.air.owned_blocks);
+ }
}
/** At one of the Airport's Terminals */