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:
@@ -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;
|
||||
|
||||
@@ -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 = () =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user