diff --git a/OpenRA.Mods.Common/Util.cs b/OpenRA.Mods.Common/Util.cs index 30bf469657..9a007dbcb0 100644 --- a/OpenRA.Mods.Common/Util.cs +++ b/OpenRA.Mods.Common/Util.cs @@ -49,10 +49,8 @@ namespace OpenRA.Mods.Common public static int QuantizeFacing(int facing, int numFrames) { var step = 256 / numFrames; - var f = NormalizeFacing(facing + step / 2) / step; - - // f may be >= numFrames so wrap it back in range - return f % numFrames; + var a = (facing + step / 2) & 0xff; + return a / step; } public static int QuantizeFacing(int facing, int numFrames, bool useClassicFacingFudge)