Browse Source

temporarily disable box limits

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

38
src/engine/objects/PlayerCharacter.java

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

Loading…
Cancel
Save