Browse Source

temporarily disable box limits

lakebane-strongholds
FatBoy-DOTC 2 months ago
parent
commit
ea0cefd3f9
  1. 34
      src/engine/objects/PlayerCharacter.java

34
src/engine/objects/PlayerCharacter.java

@ -4929,24 +4929,26 @@ public class PlayerCharacter extends AbstractCharacter {
} }
public static boolean checkIfBoxed(PlayerCharacter player){ public static boolean checkIfBoxed(PlayerCharacter player){
try { //REMOVE BEFORE LAUNCH -TEMP DISABLE OF BOX LIMIT
String machineID = player.getClientConnection().machineID; return false;
ArrayList<PlayerCharacter> sameMachine = new ArrayList<>(); //try {
for (PlayerCharacter pc : SessionManager.getAllActivePlayerCharacters()) { // String machineID = player.getClientConnection().machineID;
if (!pc.equals(player) && pc.isActive && pc.isEnteredWorld() && pc.getClientConnection().machineID.equals(machineID)) { // ArrayList<PlayerCharacter> sameMachine = new ArrayList<>();
sameMachine.add(pc); // for (PlayerCharacter pc : SessionManager.getAllActivePlayerCharacters()) {
} // if (!pc.equals(player) && pc.isActive && pc.isEnteredWorld() && pc.getClientConnection().machineID.equals(machineID)) {
} // sameMachine.add(pc);
// }
// }
boolean boxed = false; // boolean boxed = false;
for (PlayerCharacter pc : sameMachine) // for (PlayerCharacter pc : sameMachine)
if (!pc.isBoxed) // if (!pc.isBoxed)
boxed = true; // boxed = true;
return boxed; // return boxed;
}catch(Exception e){ //}catch(Exception e){
return false; // return false;
} //}
} }
@Override @Override
public void updateFlight() { public void updateFlight() {

Loading…
Cancel
Save