From 1da2db856f7114c5bd8213038a8bdd3199bc2d8b Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 10 Sep 2024 19:23:39 -0500 Subject: [PATCH] fly speed completed --- src/engine/net/client/handlers/ChangeAltitudeHandler.java | 2 ++ src/engine/objects/AbstractCharacter.java | 7 ------- src/engine/objects/PlayerCharacter.java | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/engine/net/client/handlers/ChangeAltitudeHandler.java b/src/engine/net/client/handlers/ChangeAltitudeHandler.java index cdc2ea99..1df771f8 100644 --- a/src/engine/net/client/handlers/ChangeAltitudeHandler.java +++ b/src/engine/net/client/handlers/ChangeAltitudeHandler.java @@ -46,6 +46,8 @@ public class ChangeAltitudeHandler extends AbstractClientMsgHandler { return false; if (pc.region != null && !pc.region.isOutside()) return false; + if(pc.speedMod > 0) + return false; // Find out if we already have an altitude timer running and if so diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index 6017b2fd..f7403a29 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -499,13 +499,6 @@ public abstract class AbstractCharacter extends AbstractWorldObject { if (bonus != null && !bonus.getBool(ModType.NoMod, SourceType.Fly) && bonus.getBool(ModType.Fly, SourceType.None) && flyer.isAlive()) { canFly = true; - - float moveSpeedBuffValue = bonus.getFloatPercentAll(ModType.Speed, SourceType.Buff); - if(moveSpeedBuffValue > 0) - canFly = false; - float moveSpeedBuffValue2 = bonus.getFloatPercentAll(ModType.Speed, SourceType.BUFF); - if(moveSpeedBuffValue2 > 0) - canFly = false; } return canFly; diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 54a0d102..4cd1e9d6 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -138,7 +138,7 @@ public class PlayerCharacter extends AbstractCharacter { private int lastTargetID; private int hidden = 0; // current rank of hide/sneak/invis private int seeInvis = 0; // current rank of see invis - private float speedMod; + public float speedMod; private boolean teleportMode = false; // Teleport on MoveToPoint private float dexPenalty; private long lastPlayerAttackTime = 0; @@ -4896,7 +4896,7 @@ public class PlayerCharacter extends AbstractCharacter { } if(this.isFlying()){ - if (!AbstractCharacter.CanFly(this)) { + if (this.speedMod > 0) { GroundPlayer(this); //ChatManager.chatSystemInfo(this, "You Cannot Fly While Having A MovementBuff"); }