diff --git a/src/engine/InterestManagement/InterestManager.java b/src/engine/InterestManagement/InterestManager.java index 7c1dc84a..f9aecb1c 100644 --- a/src/engine/InterestManagement/InterestManager.java +++ b/src/engine/InterestManagement/InterestManager.java @@ -538,7 +538,7 @@ public enum InterestManager implements Runnable { if(origin.machineID.equals(pc.getClientConnection().machineID)){ //add deatshroud effect - PowersManager.applyPower(player, player, Vector3fImmutable.ZERO, 1672601862, 999, false); + player.isBoxed = true; return; } } diff --git a/src/engine/gameManager/SimulationManager.java b/src/engine/gameManager/SimulationManager.java index 2c8b5b34..1e04c827 100644 --- a/src/engine/gameManager/SimulationManager.java +++ b/src/engine/gameManager/SimulationManager.java @@ -135,6 +135,17 @@ public enum SimulationManager { + e.getMessage()); e.printStackTrace(); + } + try { + if ((_minePulseTime != 0) + && (System.currentTimeMillis() > _minePulseTime)) + pulseMines(); + } catch (Exception e) { + Logger.error( + "Fatal error in City Pulse: DISABLED. Error Message : " + + e.getMessage()); + e.printStackTrace(); + } SimulationManager.executionTime = Duration.between(startTime, Instant.now()); @@ -163,6 +174,21 @@ public enum SimulationManager { if (player == null) continue; + + for(PlayerCharacter pc : SessionManager.getAllActivePlayers()){ + if(pc.isActive() == false) + continue; + + if(pc.isEnteredWorld() == false) + continue; + + if(player.getClientConnection().machineID.equals(pc.getClientConnection().machineID)){ + //add deatshroud effect + player.isBoxed = true; + break; + } + } + player.update(); } diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 35dd8c5a..26b51540 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -175,6 +175,8 @@ public class PlayerCharacter extends AbstractCharacter { private boolean dirtyLoad = true; private final ReadWriteLock dirtyLock = new ReentrantReadWriteLock(true); + public boolean isBoxed = false; + /** * No Id Constructor */ @@ -4811,6 +4813,8 @@ public class PlayerCharacter extends AbstractCharacter { updateBlessingMessage(); this.safeZone = this.isInSafeZone(); + if(this.isBoxed == true && this.containsEffect(1672601862) == false) + PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false); } catch (Exception e) { Logger.error(e);