Convert QuantizeFacing to WAngle facings.

This commit is contained in:
Paul Chote
2020-05-25 21:35:01 +01:00
committed by reaperrr
parent bfb6c671fb
commit c999b2d778
11 changed files with 34 additions and 34 deletions

View File

@@ -16,7 +16,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Fudge the coordinate system angles like the early games (for sprite sequences that use classic facing fudge).")]
public class ClassicFacingBodyOrientationInfo : BodyOrientationInfo
{
public override int QuantizeFacing(int facing, int facings)
public override WAngle QuantizeFacing(WAngle facing, int facings)
{
return Util.ClassicQuantizeFacing(facing, facings);
}

View File

@@ -85,7 +85,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
var passengerInits = new TypeDictionary()
{
new OwnerInit(p.Owner),
new DynamicFacingInit(() => body.QuantizeFacing(facing.Facing)),
new DynamicFacingInit(() => body.QuantizeFacing(WAngle.FromFacing(facing.Facing)).Facing),
};
foreach (var api in p.TraitsImplementing<IActorPreviewInitModifier>())