mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Fixed #9336
This commit is contained in:
parent
ed96b2eec8
commit
88b10f4cf8
1 changed files with 10 additions and 0 deletions
|
|
@ -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));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue