From ebeda7d7bae85cdbc2f659f09b97ab361bd41376 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 27 Aug 2022 17:14:50 -0400 Subject: [PATCH] Players grounded properly when losing flight. --- src/engine/objects/AbstractCharacter.java | 2 +- src/engine/objects/PlayerCharacter.java | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index 2413f8fb..32e9e6e7 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -1610,7 +1610,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { // Check if calculations affected flight. - if (this.getGridObjectType().equals(GameObjectType.PlayerCharacter)) { + if (this.getObjectType().equals(GameObjectType.PlayerCharacter)) { player = (PlayerCharacter) this; // Ground players who cannot fly but are currently flying diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index c7a55f57..600af48b 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -4781,10 +4781,6 @@ public void dismissNecroPets() { }finally{ this.updateLock.writeLock().unlock(); } - //temp removal - if(AbstractCharacter.CanFly(this) == false && this.altitude > 0) - GroundPlayer(this); - } } @Override