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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user