mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-04 06:31:42 +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:
parent
82058d347f
commit
7189be69b0
@ -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++;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user