Browse Source

Players grounded properly when losing flight.

pull/18/head
MagicBot 2 years ago
parent
commit
ebeda7d7ba
  1. 2
      src/engine/objects/AbstractCharacter.java
  2. 4
      src/engine/objects/PlayerCharacter.java

2
src/engine/objects/AbstractCharacter.java

@ -1610,7 +1610,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -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

4
src/engine/objects/PlayerCharacter.java

@ -4781,10 +4781,6 @@ public void dismissNecroPets() { @@ -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

Loading…
Cancel
Save