diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index d31a63c3..9fd4116a 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -1888,6 +1888,14 @@ public class ClientMessagePump implements NetMsgHandler { break; case LEAVEREQUEST: origin.disconnect(); + ArrayList sameMachine = new ArrayList<>(); + for (PlayerCharacter pc : SessionManager.getAllActivePlayers()) { + if(origin.machineID.equals(pc.getClientConnection().machineID)) + sameMachine.add(pc); + } + if(sameMachine.isEmpty() == false){ + sameMachine.get(0).isBoxed = false; + } break; case POWER: PowersManager.usePower((PerformActionMsg) msg, origin, false); diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 22bebc72..02d8682c 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -4815,21 +4815,7 @@ public class PlayerCharacter extends AbstractCharacter { this.safeZone = this.isInSafeZone(); if(this.isBoxed && this.containsEffect(1672601862) == false) { - this.isBoxed = false; - for (PlayerCharacter pc : SessionManager.getAllActivePlayers()) { - - if (pc.isActive() == false) - continue; - - if (pc.isEnteredWorld() == false) - continue; - - if (this.getClientConnection().machineID.equals(pc.getClientConnection().machineID)) { - this.isBoxed = true; - PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false); - return; - } - } + PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false); } } catch (Exception e) {