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

@@ -72,8 +72,8 @@ namespace OpenRA.Mods.Cnc.Traits.Render
void ITick.Tick(Actor self)
{
if (movement.CurrentMovementTypes.HasFlag(MovementType.Horizontal)
|| movement.CurrentMovementTypes.HasFlag(MovementType.Turn))
if (movement.CurrentMovementTypes.HasMovementType(MovementType.Horizontal)
|| movement.CurrentMovementTypes.HasMovementType(MovementType.Turn))
tick++;
if (tick < info.TickRate)