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

@@ -419,7 +419,7 @@ namespace OpenRA.Mods.Common.Traits
CurrentMovementTypes = newMovementTypes;
if (!CurrentMovementTypes.HasFlag(MovementType.Horizontal))
if (!CurrentMovementTypes.HasMovementType(MovementType.Horizontal))
{
if (Info.Roll != WAngle.Zero && Roll != WAngle.Zero)
Roll = Util.TickFacing(Roll, WAngle.Zero, Info.RollSpeed);