From 9bd494504e7b4480f5469d0974d241c1a59e75f4 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Thu, 30 Nov 2023 04:18:40 -0800 Subject: [PATCH] angleOffset is added twice in Weapon shoot (#9332) --- core/src/mindustry/type/Weapon.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index 6397a899e1..51136e5a6b 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -468,7 +468,7 @@ public class Weapon implements Cloneable{ bulletY = mountY + Angles.trnsy(weaponRotation, this.shootX + xOffset + xSpread, this.shootY + yOffset), shootAngle = bulletRotation(unit, mount, bulletX, bulletY) + angleOffset, lifeScl = bullet.scaleLife ? Mathf.clamp(Mathf.dst(bulletX, bulletY, mount.aimX, mount.aimY) / bullet.range) : 1f, - angle = angleOffset + shootAngle + Mathf.range(inaccuracy + bullet.inaccuracy); + angle = shootAngle + Mathf.range(inaccuracy + bullet.inaccuracy); Entityc shooter = unit.controller() instanceof MissileAI ai ? ai.shooter : unit; //Pass the missile's shooter down to its bullets mount.bullet = bullet.create(unit, shooter, unit.team, bulletX, bulletY, angle, -1f, (1f - velocityRnd) + Mathf.random(velocityRnd), lifeScl, null, mover, mount.aimX, mount.aimY);