Fixed some multiplayer bugs

This commit is contained in:
Anuken
2022-02-11 14:07:36 -05:00
parent 3728d137cd
commit ba3e2f6f67
5 changed files with 27 additions and 16 deletions

View File

@@ -728,12 +728,9 @@ public class DesktopInput extends InputHandler{
}
Call.commandUnits(player, ids, attack instanceof Building b ? b : null, attack instanceof Unit u ? u : null, target);
}
}
return super.tap(x, y, count, button);
}

View File

@@ -194,6 +194,9 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
public static void commandUnits(Player player, int[] unitIds, @Nullable Building buildTarget, @Nullable Unit unitTarget, @Nullable Vec2 posTarget){
if(player == null || unitIds == null) return;
//why did I ever think this was a good idea
if(unitTarget != null && unitTarget.isNull()) unitTarget = null;
if(net.server() && !netServer.admins.allowAction(player, ActionType.commandUnits, event -> {
event.unitIDs = unitIds;
})){