Use HasMovementType to avoid Enum.HasFlag allocations.

This commit is contained in:
RoosterDragon
2020-10-11 11:49:32 +01:00
committed by abcdefg30
parent 094ccf76b0
commit 2adee1e374
4 changed files with 7 additions and 7 deletions

View File

@@ -402,10 +402,10 @@ namespace OpenRA.Mods.Common.Traits
public bool IsLeaving()
{
if (CurrentMovementTypes.HasFlag(MovementType.Horizontal))
if (CurrentMovementTypes.HasMovementType(MovementType.Horizontal))
return true;
if (CurrentMovementTypes.HasFlag(MovementType.Turn))
if (CurrentMovementTypes.HasMovementType(MovementType.Turn))
return TurnToMove;
return false;