DefaultSpriteSequence: Remove redundant modulo operations

frame is already bounded by length.Value
This commit is contained in:
abcdefg30
2023-05-16 19:22:32 +02:00
committed by Gustas
parent 991e0a4c9a
commit 00f2ba1a53

View File

@@ -310,8 +310,8 @@ namespace OpenRA.Mods.Common.Graphics
var facingInner = reverseFacings ? (facings - facing) % facings : facing;
for (var frame = 0; frame < length.Value; frame++)
{
var i = transpose ? frame % length.Value * facings + facingInner :
facingInner * stride + frame % length.Value;
var i = transpose ? frame * facings + facingInner :
facingInner * stride + frame;
usedFrames.Add(frames?[i] ?? start + i);
}