Misc small fixes
This commit is contained in:
@@ -399,7 +399,7 @@ public class DesktopInput extends InputHandler{
|
||||
cursorType = ui.drillCursor;
|
||||
}
|
||||
|
||||
if(commandMode && selectedUnits.any() && ((cursor.build != null && cursor.build.team != player.team()) || (selectedEnemyUnit(input.mouseWorldX(), input.mouseWorldY()) != null))){
|
||||
if(commandMode && selectedUnits.any() && ((cursor.build != null && !cursor.build.inFogTo(player.team()) && cursor.build.team != player.team()) || (selectedEnemyUnit(input.mouseWorldX(), input.mouseWorldY()) != null))){
|
||||
cursorType = ui.targetCursor;
|
||||
}
|
||||
|
||||
|
||||
@@ -1266,7 +1266,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
}
|
||||
}
|
||||
|
||||
return tmpUnits.min(u -> u.dst(x, y) - u.hitSize/2f);
|
||||
return tmpUnits.min(u -> !u.inFogTo(player.team()), u -> u.dst(x, y) - u.hitSize/2f);
|
||||
}
|
||||
|
||||
public Seq<Unit> selectedCommandUnits(float x, float y, float w, float h){
|
||||
|
||||
Reference in New Issue
Block a user