Fixed #9336
This commit is contained in:
@@ -654,7 +654,13 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(player.team() == build.team && build.canControlSelect(player.unit())){
|
if(player.team() == build.team && build.canControlSelect(player.unit())){
|
||||||
|
var before = player.unit();
|
||||||
|
|
||||||
build.onControlSelect(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???
|
//direct dock transfer???
|
||||||
unit.dockedType = before.dockedType;
|
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));
|
Time.run(Fx.unitSpirit.lifetime, () -> Fx.unitControl.at(unit.x, unit.y, 0f, unit));
|
||||||
|
|||||||
Reference in New Issue
Block a user