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 Oct 24, 2023
1 parent aeab386 commit 76355fc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ public override void SpawnSetup(Map map, bool respawningAfterLoad) //Add ma
TurretDrawExtension turretDrawExtension = this.def.GetModExtension<TurretDrawExtension>();
if (turretDrawExtension != null)
{
TurretTopBaseMaterial = turretDrawExtension.TurretBottomGraphicData.Graphic.MatSingle;
TurretTopTopMaterial = turretDrawExtension.TurretTopGraphicData.Graphic.MatSingle;
TurretTopBaseMaterial = turretDrawExtension.TurretBottomGraphicData?.Graphic.MatSingle;
TurretTopTopMaterial = turretDrawExtension.TurretTopGraphicData?.Graphic.MatSingle;
if (turretDrawExtension.Barrels.Any())
{
foreach (var barrel in turretDrawExtension.Barrels)
Expand Down Expand Up @@ -648,7 +648,7 @@ public void DrawTurretComponents(Material mat, bool above = false)
public void DrawTurretComponentRecoiled(Material mat, Vector2 offset, Vector3 recoilDrawOffset, float recoilAngleOffset)
{
float turretTopDrawSize = def.building.turretTopDrawSize;
Vector3 v = recoilDrawOffset.RotatedBy(recoilAngleOffset);
Vector3 v = recoilDrawOffset;
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 76355fc

Please sign in to comment.