Browse Source

moved flight check to MovementManager

master
FatBoy-DOTC 3 years ago
parent
commit
87e18351be
  1. 2
      src/engine/gameManager/MovementManager.java
  2. 9
      src/engine/objects/PlayerCharacter.java

2
src/engine/gameManager/MovementManager.java

@ -374,7 +374,7 @@ public enum MovementManager { @@ -374,7 +374,7 @@ public enum MovementManager {
// if stam less that 2 - time to force a landing
if (pc.getStamina() < 10f || !canFly) {
PlayerCharacter.GroundPlayer(pc);
// dont call stop movement here as we want to
// preserve endloc
//pc.stopMovement();

9
src/engine/objects/PlayerCharacter.java

@ -4781,10 +4781,11 @@ public void dismissNecroPets() { @@ -4781,10 +4781,11 @@ public void dismissNecroPets() {
}finally{
this.updateLock.writeLock().unlock();
}
if(AbstractCharacter.CanFly(this) == false && this.altitude > 0)
{
GroundPlayer(this);
}
//temp removal
//if(AbstractCharacter.CanFly(this) == false && this.altitude > 0)
//{
// GroundPlayer(this);
//}
}
}
@Override

Loading…
Cancel
Save