From 2b62ab6b2f01909b9ecaa6b9e6ad1be5f62aab1c Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 10 Oct 2022 19:23:13 -0400 Subject: [PATCH] Fixed #7690 --- core/src/mindustry/type/Weapon.java | 2 +- core/src/mindustry/world/blocks/defense/turrets/Turret.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index 90c55dba9f..a048118d48 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -437,7 +437,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); + angle = angleOffset + shootAngle + Mathf.range(inaccuracy + bullet.inaccuracy); mount.bullet = bullet.create(unit, unit.team, bulletX, bulletY, angle, -1f, (1f - velocityRnd) + Mathf.random(velocityRnd), lifeScl, null, mover, mount.aimX, mount.aimY); handleBullet(unit, mount, mount.bullet); diff --git a/core/src/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/mindustry/world/blocks/defense/turrets/Turret.java index 3134e3c5a5..326a4c2a10 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/Turret.java @@ -558,7 +558,7 @@ public class Turret extends ReloadTurret{ xSpread = Mathf.range(xRand), bulletX = x + Angles.trnsx(rotation - 90, shootX + xOffset + xSpread, shootY + yOffset), bulletY = y + Angles.trnsy(rotation - 90, shootX + xOffset + xSpread, shootY + yOffset), - shootAngle = rotation + angleOffset + Mathf.range(inaccuracy); + shootAngle = rotation + angleOffset + Mathf.range(inaccuracy + type.inaccuracy); float lifeScl = type.scaleLife ? Mathf.clamp(Mathf.dst(bulletX, bulletY, targetPos.x, targetPos.y) / type.range, minRange / type.range, range() / type.range) : 1f;