From d45870ca23e8dbb662ed017f5f7af17a49d4f969 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 29 Apr 2017 13:01:29 +0100 Subject: [PATCH] Allow fixed barrel pitches to be defined in yaml. --- OpenRA.Mods.Common/Traits/Render/WithVoxelBarrel.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Mods.Common/Traits/Render/WithVoxelBarrel.cs b/OpenRA.Mods.Common/Traits/Render/WithVoxelBarrel.cs index 2fedcec3f1..80537f32ac 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithVoxelBarrel.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithVoxelBarrel.cs @@ -29,6 +29,9 @@ namespace OpenRA.Mods.Common.Traits.Render [Desc("Visual offset")] public readonly WVec LocalOffset = WVec.Zero; + [Desc("Rotate the barrel relative to the body")] + public readonly WRot LocalOrientation = WRot.Zero; + [Desc("Defines if the Voxel should have a shadow.")] public readonly bool ShowShadow = true; @@ -103,6 +106,7 @@ namespace OpenRA.Mods.Common.Traits.Render { var b = self.Orientation; var qb = body.QuantizeOrientation(self, b); + yield return Info.LocalOrientation; yield return turreted.WorldOrientation(self) - b + WRot.FromYaw(b.Yaw - qb.Yaw); yield return qb; }