Do not command select logic controlled units by default
This commit is contained in:
@@ -475,7 +475,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
|
||||
/** @return whether the unit *can* be commanded, even if its controller is not currently CommandAI. */
|
||||
public boolean allowCommand(){
|
||||
return controller instanceof CommandAI || (controller instanceof LogicAI && type.allowChangeCommands);
|
||||
return controller instanceof CommandAI || (controller instanceof LogicAI ai && (ai.controller == null || !ai.controller.block.privileged) && type.allowChangeCommands);
|
||||
}
|
||||
|
||||
/** @return whether the unit has a CommandAI controller */
|
||||
@@ -525,7 +525,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
}
|
||||
|
||||
public boolean playerControllable(){
|
||||
return type.playerControllable;
|
||||
return type.playerControllable && !(controller instanceof LogicAI ai && ai.controller != null && ai.controller.block.privileged);
|
||||
}
|
||||
|
||||
public boolean targetable(Team targeter){
|
||||
|
||||
Reference in New Issue
Block a user