angleOffset is added twice in Weapon shoot (#9332)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user