Animation facing -> WAngle.

This commit is contained in:
Paul Chote
2020-05-08 18:57:28 +01:00
committed by atlimit8
parent 361e2d463c
commit fe58ed1283
26 changed files with 74 additions and 63 deletions

View File

@@ -161,7 +161,7 @@ namespace OpenRA.Mods.Common.Traits
if (port == null)
return;
var muzzleFacing = targetYaw.Angle / 4;
var muzzleFacing = targetYaw.Facing;
paxFacing[a.Actor].Facing = muzzleFacing;
paxPos[a.Actor].SetVisualPosition(a.Actor, pos + PortOffset(self, port));
@@ -172,7 +172,7 @@ namespace OpenRA.Mods.Common.Traits
if (a.Info.MuzzleSequence != null)
{
// Muzzle facing is fixed once the firing starts
var muzzleAnim = new Animation(self.World, paxRender[a.Actor].GetImage(a.Actor), () => muzzleFacing);
var muzzleAnim = new Animation(self.World, paxRender[a.Actor].GetImage(a.Actor), () => targetYaw);
var sequence = a.Info.MuzzleSequence;
if (a.Info.MuzzleSplitFacings > 0)