Fixed #7690
This commit is contained in:
@@ -437,7 +437,7 @@ public class Weapon implements Cloneable{
|
|||||||
bulletY = mountY + Angles.trnsy(weaponRotation, this.shootX + xOffset + xSpread, this.shootY + yOffset),
|
bulletY = mountY + Angles.trnsy(weaponRotation, this.shootX + xOffset + xSpread, this.shootY + yOffset),
|
||||||
shootAngle = bulletRotation(unit, mount, bulletX, bulletY) + angleOffset,
|
shootAngle = bulletRotation(unit, mount, bulletX, bulletY) + angleOffset,
|
||||||
lifeScl = bullet.scaleLife ? Mathf.clamp(Mathf.dst(bulletX, bulletY, mount.aimX, mount.aimY) / bullet.range) : 1f,
|
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);
|
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);
|
handleBullet(unit, mount, mount.bullet);
|
||||||
|
|||||||
@@ -558,7 +558,7 @@ public class Turret extends ReloadTurret{
|
|||||||
xSpread = Mathf.range(xRand),
|
xSpread = Mathf.range(xRand),
|
||||||
bulletX = x + Angles.trnsx(rotation - 90, shootX + xOffset + xSpread, shootY + yOffset),
|
bulletX = x + Angles.trnsx(rotation - 90, shootX + xOffset + xSpread, shootY + yOffset),
|
||||||
bulletY = y + Angles.trnsy(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;
|
float lifeScl = type.scaleLife ? Mathf.clamp(Mathf.dst(bulletX, bulletY, targetPos.x, targetPos.y) / type.range, minRange / type.range, range() / type.range) : 1f;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user