Browse Source

fall slowly while stunned

lakebane
FatBoy-DOTC 1 week ago
parent
commit
63b40c27a5
  1. 9
      src/engine/objects/PlayerCharacter.java

9
src/engine/objects/PlayerCharacter.java

@ -4914,6 +4914,15 @@ public class PlayerCharacter extends AbstractCharacter { @@ -4914,6 +4914,15 @@ public class PlayerCharacter extends AbstractCharacter {
GroundPlayer(this);
//ChatManager.chatSystemInfo(this, "You Cannot Fly While Having A MovementBuff");
}
if(this.getDesiredAltitude() == this.getAltitude() && this.bonuses.getBool(ModType.Stunned, SourceType.None)){
this.setAltitude(this.getAltitude());
this.setDesiredAltitude(this.getAltitude() - 10);
this.setTakeOffTime(System.currentTimeMillis());
ChangeAltitudeMsg msg = new ChangeAltitudeMsg(this.getObjectType().ordinal(), this.getObjectUUID(), false, this.getAltitude(), this.getDesiredAltitude(), this.getAltitude());
// force a landing
DispatchMessage.dispatchMsgToInterestArea(this, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
}
}
} catch (Exception e) {

Loading…
Cancel
Save