add thing (#7012)
This commit is contained in:
@@ -254,7 +254,7 @@ public class DesktopInput extends InputHandler{
|
||||
//validate commanding units
|
||||
selectedUnits.removeAll(u -> !u.isCommandable() || !u.isValid());
|
||||
|
||||
if(!scene.hasMouse() && !locked){
|
||||
if(!scene.hasMouse() && !locked && state.rules.possessionAllowed){
|
||||
if(Core.input.keyDown(Binding.control) && Core.input.keyTap(Binding.select)){
|
||||
Unit on = selectedUnit();
|
||||
var build = selectedControlBuild();
|
||||
|
||||
@@ -475,7 +475,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
if(player == null) return;
|
||||
|
||||
//make sure player is allowed to control the unit
|
||||
if(net.server() && !netServer.admins.allowAction(player, ActionType.control, action -> action.unit = unit)){
|
||||
if(net.server() && (!state.rules.possessionAllowed || !netServer.admins.allowAction(player, ActionType.control, action -> action.unit = unit))){
|
||||
throw new ValidateException(player, "Player cannot control a unit.");
|
||||
}
|
||||
|
||||
|
||||
@@ -658,10 +658,10 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
payloadTarget = null;
|
||||
|
||||
//control a unit/block detected on first tap of double-tap
|
||||
if(unitTapped != null){
|
||||
if(unitTapped != null && state.rules.possessionAllowed){
|
||||
Call.unitControl(player, unitTapped);
|
||||
recentRespawnTimer = 1f;
|
||||
}else if(buildingTapped != null){
|
||||
}else if(buildingTapped != null && state.rules.possessionAllowed){
|
||||
Call.buildingControlSelect(player, buildingTapped);
|
||||
recentRespawnTimer = 1f;
|
||||
}else if(!checkConfigTap() && !tryBeginMine(cursor)){
|
||||
|
||||
Reference in New Issue
Block a user