Added rotation logic to the renderer to enable the use of Interpolated Facings.

This commit is contained in:
AspectInteractive2
2022-06-07 22:11:51 +02:00
committed by Matthias Mailänder
parent e060d6eb05
commit a1a50d6c98
11 changed files with 223 additions and 42 deletions

View File

@@ -29,7 +29,8 @@ namespace OpenRA.Mods.Common.Traits
throw new InvalidOperationException("Actor " + ai.Name + " is missing sequence to quantize facings from.");
var rsi = ai.TraitInfo<RenderSpritesInfo>();
return sequenceProvider.GetSequence(rsi.GetImage(ai, race), Sequence).Facings;
var seq = sequenceProvider.GetSequence(rsi.GetImage(ai, race), Sequence);
return seq.InterpolatedFacings == -1 ? seq.Facings : seq.InterpolatedFacings;
}
public override object Create(ActorInitializer init) { return new QuantizeFacingsFromSequence(this); }