Fixed #10039
This commit is contained in:
@@ -160,7 +160,7 @@ public class BuilderAI extends AIController{
|
||||
float minDst = Float.MAX_VALUE;
|
||||
Player closest = null;
|
||||
for(var player : Groups.player){
|
||||
if(player.unit().canBuild() && !player.dead() && player.team() == unit.team){
|
||||
if(!player.dead() && player.isBuilder() && player.team() == unit.team){
|
||||
float dst = player.dst2(unit);
|
||||
if(dst < minDst){
|
||||
closest = player;
|
||||
|
||||
@@ -572,7 +572,7 @@ public class DesktopInput extends InputHandler{
|
||||
player.unit().mineTile = null;
|
||||
}
|
||||
|
||||
if(Core.input.keyTap(Binding.clear_building)){
|
||||
if(Core.input.keyTap(Binding.clear_building) && !player.dead()){
|
||||
player.unit().clearBuilding();
|
||||
}
|
||||
|
||||
|
||||
@@ -913,7 +913,7 @@ public class HudFragment{
|
||||
|
||||
table.table().update(t -> {
|
||||
t.left();
|
||||
Bits applied = player.unit() == null ? null : player.unit().statusBits();
|
||||
Bits applied = player.dead() ? null : player.unit().statusBits();
|
||||
if(!statuses.equals(applied)){
|
||||
t.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user