no move buff while flying
This commit is contained in:
@@ -500,12 +500,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
|||||||
if (bonus != null && !bonus.getBool(ModType.NoMod, SourceType.Fly) && bonus.getBool(ModType.Fly, SourceType.None) && flyer.isAlive())
|
if (bonus != null && !bonus.getBool(ModType.NoMod, SourceType.Fly) && bonus.getBool(ModType.Fly, SourceType.None) && flyer.isAlive())
|
||||||
canFly = true;
|
canFly = true;
|
||||||
|
|
||||||
for(Effect eff : flyer.effects.values()){
|
if(bonus != null && bonus.getFloat(ModType.Speed,SourceType.None) > 0){
|
||||||
for(AbstractEffectModifier mod : eff.getEffectModifiers()){
|
return false;
|
||||||
if(mod.modType.equals(ModType.Speed)){
|
|
||||||
canFly = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return canFly;
|
return canFly;
|
||||||
|
|||||||
@@ -4827,6 +4827,12 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
|
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.isFlying()){
|
||||||
|
if(this.getBonuses() != null && this.getBonuses().getFloat(ModType.Speed,SourceType.None) > 0){
|
||||||
|
GroundPlayer(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error(e);
|
Logger.error(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user