Pass pre-combined rotations into the rendering code.

This commit is contained in:
Paul Chote
2020-07-12 13:59:09 +01:00
committed by tovl
parent 3c9db4c2ac
commit aae497eff1
9 changed files with 28 additions and 32 deletions

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
var frame = init.GetValue<BodyAnimationFrameInit, uint>(this, 0);
yield return new ModelAnimation(model, () => WVec.Zero,
() => new[] { body.QuantizeOrientation(orientation(), facings) },
() => body.QuantizeOrientation(orientation(), facings),
() => false, () => frame, ShowShadow);
}
}
@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
var model = self.World.ModelCache.GetModelSequence(rv.Image, info.Sequence);
frames = model.Frames;
modelAnimation = new ModelAnimation(model, () => WVec.Zero,
() => new[] { body.QuantizeOrientation(self, self.Orientation) },
() => body.QuantizeOrientation(self, self.Orientation),
() => false, () => frame, info.ShowShadow);
rv.Add(modelAnimation);