mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 07:17:19 +07:00
killShooter
+ shootOnDeath
Causes Double Firing (#7524)
* Store building pos instead of start pos
Fix an explosion hitting the same building multiple times if it's larger than 1x1.
* Increment total shots before spawning bullet
Fixes `killShooter` triggering the `shootOnDeath` shot.
* Revert "Store building pos instead of start pos"
This reverts commit bfd04e2683
.
This commit is contained in:
@ -408,12 +408,12 @@ public class Weapon implements Cloneable{
|
||||
}
|
||||
|
||||
shoot.shoot(mount.totalShots, (xOffset, yOffset, angle, delay, mover) -> {
|
||||
mount.totalShots++;
|
||||
if(delay > 0f){
|
||||
Time.run(delay, () -> bullet(unit, mount, xOffset, yOffset, angle, mover));
|
||||
}else{
|
||||
bullet(unit, mount, xOffset, yOffset, angle, mover);
|
||||
}
|
||||
mount.totalShots++;
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user