From 2043db8e2f93dbcb11728f20cfa80ed2e046b48d Mon Sep 17 00:00:00 2001 From: CMDR-Bill-Doors Date: Thu, 21 Sep 2023 06:10:08 +0100 Subject: [PATCH] Update Building_TurretGunCE.cs --- .../CombatExtended/Things/Building_TurretGunCE.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs b/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs index 899759ecf8..edef595adc 100644 --- a/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs +++ b/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs @@ -640,10 +640,8 @@ public void DrawTurretComponents(Material mat, bool above = false) public void DrawTurretComponentRecoiled(Material mat, Vector2 offset, Vector3 recoilDrawOffset, float recoilAngleOffset) { - Vector3 v = new Vector3(def.building.turretTopOffset.x, 0f, def.building.turretTopOffset.y).RotatedBy(top.CurRotation); float turretTopDrawSize = def.building.turretTopDrawSize; - v = v.RotatedBy(recoilAngleOffset); - v += recoilDrawOffset; + Vector3 v = recoilDrawOffset.RotatedBy(recoilAngleOffset); float num = CurrentEffectiveVerb?.AimAngleOverride ?? top.CurRotation; Matrix4x4 matrix = default(Matrix4x4); matrix.SetTRS(DrawPos + Altitudes.AltIncVect + v + new Vector3(offset.x, 0f, offset.y).RotatedBy(top.CurRotation), (-90 + num).ToQuat(), new Vector3(turretTopDrawSize, 1f, turretTopDrawSize));