Convert (Dynamic)FacingInit, (Dynamic)TurretFacingInit to WAngle.

This commit is contained in:
Paul Chote
2020-06-26 00:33:08 +01:00
committed by abcdefg30
parent e8f443f4a9
commit a2269e7ee7
36 changed files with 133 additions and 155 deletions

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits.Render
Func<WVec> turretOffset = () => body.LocalToWorld(t.Offset.Rotate(orientation()));
var turretFacing = Turreted.TurretFacingFromInit(init, t);
Func<WRot> turretBodyOrientation = () => WRot.FromYaw(WAngle.FromFacing(turretFacing()) - orientation().Yaw);
Func<WRot> turretBodyOrientation = () => WRot.FromYaw(turretFacing() - orientation().Yaw);
yield return new ModelAnimation(model, turretOffset,
() => new[] { turretBodyOrientation(), body.QuantizeOrientation(orientation(), facings) }, () => false, () => 0, ShowShadow);
}