diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs index 663a76b7a2..8a8b6beae1 100644 --- a/OpenRA.Game/Actor.cs +++ b/OpenRA.Game/Actor.cs @@ -69,7 +69,7 @@ namespace OpenRA { get { - return facing != null ? facing.Orientation : WRot.Zero; + return facing != null ? facing.Orientation : WRot.None; } } diff --git a/OpenRA.Game/WRot.cs b/OpenRA.Game/WRot.cs index d2a79211e0..deb27b6ed4 100644 --- a/OpenRA.Game/WRot.cs +++ b/OpenRA.Game/WRot.cs @@ -21,7 +21,7 @@ namespace OpenRA public readonly WAngle Roll, Pitch, Yaw; public WRot(WAngle roll, WAngle pitch, WAngle yaw) { Roll = roll; Pitch = pitch; Yaw = yaw; } - public static readonly WRot Zero = new WRot(WAngle.Zero, WAngle.Zero, WAngle.Zero); + public static readonly WRot None = new WRot(WAngle.Zero, WAngle.Zero, WAngle.Zero); public static WRot FromFacing(int facing) { return new WRot(WAngle.Zero, WAngle.Zero, WAngle.FromFacing(facing)); } public static WRot FromYaw(WAngle yaw) { return new WRot(WAngle.Zero, WAngle.Zero, yaw); } diff --git a/OpenRA.Mods.Common/Activities/Air/Land.cs b/OpenRA.Mods.Common/Activities/Air/Land.cs index ac2c42d706..b1450446a6 100644 --- a/OpenRA.Mods.Common/Activities/Air/Land.cs +++ b/OpenRA.Mods.Common/Activities/Air/Land.cs @@ -159,7 +159,7 @@ namespace OpenRA.Mods.Common.Activities // Approach landing from the opposite direction of the desired facing // TODO: Calculate sensible trajectory without preferred facing. - var rotation = WRot.Zero; + var rotation = WRot.None; if (desiredFacing.HasValue) rotation = WRot.FromYaw(desiredFacing.Value); diff --git a/OpenRA.Mods.Common/Graphics/ActorPreview.cs b/OpenRA.Mods.Common/Graphics/ActorPreview.cs index 5b24b5cb6a..94b1258616 100644 --- a/OpenRA.Mods.Common/Graphics/ActorPreview.cs +++ b/OpenRA.Mods.Common/Graphics/ActorPreview.cs @@ -66,7 +66,7 @@ namespace OpenRA.Mods.Common.Graphics { var facingInfo = Actor.TraitInfoOrDefault(); if (facingInfo == null) - return () => WRot.Zero; + return () => WRot.None; // Dynamic facing takes priority var dynamicInit = reference.GetOrDefault(); diff --git a/OpenRA.Mods.Common/Traits/Render/WithSpriteBarrel.cs b/OpenRA.Mods.Common/Traits/Render/WithSpriteBarrel.cs index 4bc282d7e1..75580a34cd 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithSpriteBarrel.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithSpriteBarrel.cs @@ -101,7 +101,7 @@ namespace OpenRA.Mods.Common.Traits.Render var localOffset = Info.LocalOffset + new WVec(-armament.Recoil, WDist.Zero, WDist.Zero); var turretOffset = turreted != null ? turreted.Position(self) : WVec.Zero; var quantizedBody = body.QuantizeOrientation(self, self.Orientation); - var turretOrientation = turreted != null ? turreted.WorldOrientation(self) - quantizedBody : WRot.Zero; + var turretOrientation = turreted != null ? turreted.WorldOrientation(self) - quantizedBody : WRot.None; var quantizedTurret = body.QuantizeOrientation(self, turretOrientation); return turretOffset + body.LocalToWorld(localOffset.Rotate(quantizedTurret).Rotate(quantizedBody)); diff --git a/OpenRA.Mods.Common/Traits/Render/WithVoxelBarrel.cs b/OpenRA.Mods.Common/Traits/Render/WithVoxelBarrel.cs index 187db92b95..fc76cb3779 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithVoxelBarrel.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithVoxelBarrel.cs @@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Traits.Render public readonly WVec LocalOffset = WVec.Zero; [Desc("Rotate the barrel relative to the body")] - public readonly WRot LocalOrientation = WRot.Zero; + public readonly WRot LocalOrientation = WRot.None; [Desc("Defines if the Voxel should have a shadow.")] public readonly bool ShowShadow = true; @@ -92,7 +92,7 @@ namespace OpenRA.Mods.Common.Traits.Render var qb = body.QuantizeOrientation(self, b); var localOffset = Info.LocalOffset + new WVec(-armament.Recoil, WDist.Zero, WDist.Zero); var turretLocalOffset = turreted != null ? turreted.Offset : WVec.Zero; - var turretOrientation = turreted != null ? turreted.WorldOrientation(self) - b + WRot.FromYaw(b.Yaw - qb.Yaw) : WRot.Zero; + var turretOrientation = turreted != null ? turreted.WorldOrientation(self) - b + WRot.FromYaw(b.Yaw - qb.Yaw) : WRot.None; return body.LocalToWorld((turretLocalOffset + localOffset.Rotate(turretOrientation)).Rotate(qb)); }