Better handling of missiles splitting to other missiles (#8603)

- Pass a shooter separate to owner into `BulletType#create`. `killShooter` kills the owner while the shooter is passed into the missile ai
- `killShooter` no longer kills already dead units
- `MissileAI` no longer aims at shooter's aim pos if the shooter is dead
This commit is contained in:
MEEPofFaith
2023-06-15 10:57:27 -07:00
committed by GitHub
parent 71caf31543
commit 40c5510205
3 changed files with 13 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ public class MissileAI extends AIController{
float time = unit instanceof TimedKillc t ? t.time() : 1000000f;
if(time >= unit.type.homingDelay && shooter != null){
if(time >= unit.type.homingDelay && shooter != null && !shooter.dead()){
unit.lookAt(shooter.aimX, shooter.aimY);
}