From 8a0303e0f5bb2cfc03898bdc6b0e1cd555adf67a Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 14 Feb 2024 14:00:23 -0600 Subject: [PATCH] boxshroud fixes --- src/engine/net/client/ClientMessagePump.java | 8 ++++++++ src/engine/objects/PlayerCharacter.java | 16 +--------------- 2 files changed, 9 insertions(+), 15 deletions(-) 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) {