Fix setting MayYieldReservation when there is no reservation

This commit is contained in:
Oliver Brakmann
2016-09-15 20:50:56 +02:00
parent 9fbda6b598
commit 852d947764
4 changed files with 44 additions and 3 deletions

View File

@@ -111,7 +111,7 @@ namespace OpenRA.Mods.Common.Traits
public CPos TopLeft { get { return self.World.Map.CellContaining(CenterPosition); } }
public int TurnSpeed { get { return Info.TurnSpeed; } }
public Actor ReservedActor { get; private set; }
public bool MayYieldReservation;
public bool MayYieldReservation { get; private set; }
bool airborne;
bool cruising;
@@ -282,6 +282,14 @@ namespace OpenRA.Mods.Common.Traits
}
}
public void AllowYieldingReservation()
{
if (reservation == null)
return;
MayYieldReservation = true;
}
public void UnReserve()
{
if (reservation == null)