Added rotation logic to the renderer to enable the use of Interpolated Facings.
This commit is contained in:
committed by
Matthias Mailänder
parent
e060d6eb05
commit
a1a50d6c98
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user