Browse Source

fly speed completed

lakebane-strongholds
FatBoy-DOTC 3 months ago
parent
commit
1da2db856f
  1. 2
      src/engine/net/client/handlers/ChangeAltitudeHandler.java
  2. 7
      src/engine/objects/AbstractCharacter.java
  3. 4
      src/engine/objects/PlayerCharacter.java

2
src/engine/net/client/handlers/ChangeAltitudeHandler.java

@ -46,6 +46,8 @@ public class ChangeAltitudeHandler extends AbstractClientMsgHandler { @@ -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

7
src/engine/objects/AbstractCharacter.java

@ -499,13 +499,6 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -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;

4
src/engine/objects/PlayerCharacter.java

@ -138,7 +138,7 @@ public class PlayerCharacter extends AbstractCharacter { @@ -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 { @@ -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");
}

Loading…
Cancel
Save