Fix some reservation issues.

- TakeOff.Tick was nulling a local variable, rather than the Reservation field - this is changed to call UnReserve which does the right thing.
- Aircraft.ResolveOrder was missing an UnReserve call before setting a new reservation.
This commit is contained in:
RoosterDragon
2015-10-27 22:00:26 +00:00
parent 549f8a9e7c
commit e2dd967757
2 changed files with 4 additions and 6 deletions

View File

@@ -30,12 +30,7 @@ namespace OpenRA.Mods.Common.Activities
if (NextActivity == null)
self.CancelActivity();
var reservation = aircraft.Reservation;
if (reservation != null)
{
reservation.Dispose();
reservation = null;
}
aircraft.UnReserve();
var host = aircraft.GetActorBelow();
var hasHost = host != null;

View File

@@ -543,7 +543,10 @@ namespace OpenRA.Mods.Common.Traits
{
var res = order.TargetActor.TraitOrDefault<Reservable>();
if (res != null)
{
UnReserve();
Reservation = res.Reserve(order.TargetActor, self, this);
}
Action enter = () =>
{