This commit is contained in:
Anuken 2023-12-01 13:34:17 -05:00
parent ed96b2eec8
commit 88b10f4cf8

View file

@ -654,7 +654,13 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
}
if(player.team() == build.team && build.canControlSelect(player.unit())){
var before = player.unit();
build.onControlSelect(player.unit());
if(!before.dead && before.spawnedByCore && !before.isPlayer()){
Call.unitDespawn(before);
}
}
}
@ -699,6 +705,10 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
//direct dock transfer???
unit.dockedType = before.dockedType;
}
if(before.spawnedByCore && !before.isPlayer()){
Call.unitDespawn(before);
}
}
Time.run(Fx.unitSpirit.lifetime, () -> Fx.unitControl.at(unit.x, unit.y, 0f, unit));