Skip to content

Commit

Permalink
Update Building_TurretGunCE.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
CMDR-Bill-Doors committed Sep 21, 2023
1 parent 712eb0a commit 2043db8
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 2043db8

Please sign in to comment.