Skip to content

Commit

Permalink
Only count in depth strider with water.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Nov 8, 2015
1 parent eef50d0 commit 5d4c71e
Showing 1 changed file with 8 additions and 6 deletions.
Expand Up @@ -606,12 +606,14 @@ else if (from.isInLiquid() && to.isInLiquid()) {
// TODO: Test how to go with only checking from (less dolphins).
// TODO: Sneaking and blocking applies to when in water !
hAllowedDistance = modSwim * walkSpeed * cc.survivalFlySwimmingSpeed / 100D;
final int level = BridgeEnchant.getDepthStriderLevel(player);
if (level > 0) {
// The hard way.
hAllowedDistance *= modDepthStrider[level];
// Modifiers: Most speed seems to be reached on ground, but couldn't nail down.
useBaseModifiers = true;
if (from.isInWater() || !from.isInLava()) { // (We don't really have other liquids, though.)
final int level = BridgeEnchant.getDepthStriderLevel(player);
if (level > 0) {
// The hard way.
hAllowedDistance *= modDepthStrider[level];
// Modifiers: Most speed seems to be reached on ground, but couldn't nail down.
useBaseModifiers = true;
}
}
// (Friction is used as is.)
}
Expand Down

0 comments on commit 5d4c71e

Please sign in to comment.