Player moving on ledges check replaced by combined Water-Castle check.
This commit is contained in:
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3275,25 +3275,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3320,7 +3307,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3522,7 +3509,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
@@ -3275,25 +3275,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3320,7 +3307,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3522,7 +3509,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3275,25 +3275,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3320,7 +3307,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3522,7 +3509,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3285,25 +3285,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3330,7 +3317,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3532,7 +3519,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3285,25 +3285,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3330,7 +3317,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3532,7 +3519,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+14
-31
@@ -4950,18 +4950,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
double dx = m._xDestination - m._xAccurate;
|
double dx = m._xDestination - m._xAccurate;
|
||||||
double dy = m._yDestination - m._yAccurate;
|
double dy = m._yDestination - m._yAccurate;
|
||||||
double dz = m._zDestination - zPrev; // Z coordinate will follow client values
|
double dz = m._zDestination - zPrev; // Z coordinate will follow client values
|
||||||
|
if (isPlayer() && !_isFlying)
|
||||||
float speed;
|
|
||||||
if (this instanceof Boat)
|
|
||||||
{
|
|
||||||
speed = ((Boat) this).boatSpeed;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
speed = getStat().getMoveSpeed();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isPlayer())
|
|
||||||
{
|
{
|
||||||
// In case of cursor movement, avoid moving through obstacles.
|
// In case of cursor movement, avoid moving through obstacles.
|
||||||
if (_cursorKeyMovement)
|
if (_cursorKeyMovement)
|
||||||
@@ -5037,37 +5026,31 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double distFraction;
|
double delta = (dx * dx) + (dy * dy);
|
||||||
final double distPassed = (speed * (gameTicks - m._moveTimestamp)) / GameTimeTaskManager.TICKS_PER_SECOND;
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
if ((((dx * dx) + (dy * dy)) < 10000) && ((dz * dz) > 2500)) // close enough, allows error between client and server geodata if it cannot be avoided
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
distFraction = distPassed / Math.sqrt((dx * dx) + (dy * dy));
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
distFraction = distPassed / Math.sqrt((dx * dx) + (dy * dy) + (dz * dz));
|
delta = Math.sqrt(delta + (dz * dz));
|
||||||
|
}
|
||||||
|
|
||||||
|
double distFraction = Double.MAX_VALUE;
|
||||||
|
if (delta > 1)
|
||||||
|
{
|
||||||
|
final double distPassed = (_stat.getMoveSpeed() * (gameTicks - m._moveTimestamp)) / GameTimeTaskManager.TICKS_PER_SECOND;
|
||||||
|
distFraction = distPassed / delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (distFraction > 1)
|
if (distFraction > 1)
|
||||||
{
|
{
|
||||||
// Set the position of the Creature to the destination
|
// Set the position of the Creature to the destination
|
||||||
super.setXYZ(m._xDestination, m._yDestination, m._zDestination);
|
super.setXYZ(m._xDestination, m._yDestination, m._zDestination);
|
||||||
|
|
||||||
if (isBoat())
|
if (isBoat())
|
||||||
{
|
{
|
||||||
((Boat) this).updatePeopleInTheBoat(m._xDestination, m._yDestination, m._zDestination);
|
((Boat) this).updatePeopleInTheBoat(m._xDestination, m._yDestination, m._zDestination);
|
||||||
@@ -5306,7 +5289,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
final int curZ = getZ();
|
final int curZ = getZ();
|
||||||
|
|
||||||
// Mobius: Fix for teleporting on top of catacomb entrances.
|
// Mobius: Fix for teleporting on top of catacomb entrances.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (z > curZ))
|
if (isInWater && (z > curZ))
|
||||||
{
|
{
|
||||||
z = Math.max(z - 500, curZ);
|
z = Math.max(z - 500, curZ);
|
||||||
|
|||||||
@@ -4996,18 +4996,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
double dx = m._xDestination - m._xAccurate;
|
double dx = m._xDestination - m._xAccurate;
|
||||||
double dy = m._yDestination - m._yAccurate;
|
double dy = m._yDestination - m._yAccurate;
|
||||||
double dz = m._zDestination - zPrev; // Z coordinate will follow client values
|
double dz = m._zDestination - zPrev; // Z coordinate will follow client values
|
||||||
|
if (isPlayer() && !_isFlying)
|
||||||
float speed;
|
|
||||||
if (this instanceof Boat)
|
|
||||||
{
|
|
||||||
speed = ((Boat) this).boatSpeed;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
speed = getStat().getMoveSpeed();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isPlayer())
|
|
||||||
{
|
{
|
||||||
// In case of cursor movement, avoid moving through obstacles.
|
// In case of cursor movement, avoid moving through obstacles.
|
||||||
if (_cursorKeyMovement)
|
if (_cursorKeyMovement)
|
||||||
@@ -5083,37 +5072,31 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double distFraction;
|
double delta = (dx * dx) + (dy * dy);
|
||||||
final double distPassed = (speed * (gameTicks - m._moveTimestamp)) / GameTimeTaskManager.TICKS_PER_SECOND;
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
if ((((dx * dx) + (dy * dy)) < 10000) && ((dz * dz) > 2500)) // close enough, allows error between client and server geodata if it cannot be avoided
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
distFraction = distPassed / Math.sqrt((dx * dx) + (dy * dy));
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
distFraction = distPassed / Math.sqrt((dx * dx) + (dy * dy) + (dz * dz));
|
delta = Math.sqrt(delta + (dz * dz));
|
||||||
|
}
|
||||||
|
|
||||||
|
double distFraction = Double.MAX_VALUE;
|
||||||
|
if (delta > 1)
|
||||||
|
{
|
||||||
|
final double distPassed = (_stat.getMoveSpeed() * (gameTicks - m._moveTimestamp)) / GameTimeTaskManager.TICKS_PER_SECOND;
|
||||||
|
distFraction = distPassed / delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (distFraction > 1)
|
if (distFraction > 1)
|
||||||
{
|
{
|
||||||
// Set the position of the Creature to the destination
|
// Set the position of the Creature to the destination
|
||||||
super.setXYZ(m._xDestination, m._yDestination, m._zDestination);
|
super.setXYZ(m._xDestination, m._yDestination, m._zDestination);
|
||||||
|
|
||||||
if (isBoat())
|
if (isBoat())
|
||||||
{
|
{
|
||||||
((Boat) this).updatePeopleInTheBoat(m._xDestination, m._yDestination, m._zDestination);
|
((Boat) this).updatePeopleInTheBoat(m._xDestination, m._yDestination, m._zDestination);
|
||||||
@@ -5352,7 +5335,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
final int curZ = getZ();
|
final int curZ = getZ();
|
||||||
|
|
||||||
// Mobius: Fix for teleporting on top of catacomb entrances.
|
// Mobius: Fix for teleporting on top of catacomb entrances.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (z > curZ))
|
if (isInWater && (z > curZ))
|
||||||
{
|
{
|
||||||
z = Math.max(z - 500, curZ);
|
z = Math.max(z - 500, curZ);
|
||||||
|
|||||||
@@ -4059,25 +4059,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -4104,7 +4091,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -4304,7 +4291,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
@@ -4250,25 +4250,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -4295,7 +4282,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -4495,7 +4482,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
@@ -4252,25 +4252,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -4297,7 +4284,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -4497,7 +4484,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3289,25 +3289,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3334,7 +3321,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3536,7 +3523,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3289,25 +3289,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3334,7 +3321,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3536,7 +3523,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3289,25 +3289,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3334,7 +3321,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3536,7 +3523,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3288,25 +3288,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3333,7 +3320,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3535,7 +3522,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3276,25 +3276,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3321,7 +3308,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3523,7 +3510,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3291,25 +3291,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3336,7 +3323,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3538,7 +3525,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3310,25 +3310,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3355,7 +3342,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3557,7 +3544,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3320,25 +3320,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3365,7 +3352,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3567,7 +3554,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
+4
-17
@@ -3320,25 +3320,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent player moving on ledges.
|
|
||||||
if ((dz > 180) && (distance < 300))
|
|
||||||
{
|
|
||||||
_move.onGeodataPathIndex = -1;
|
|
||||||
if (hasAI() && getAI().isFollowing())
|
|
||||||
{
|
|
||||||
getAI().stopFollow();
|
|
||||||
}
|
|
||||||
stopMove(null);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isFloating = _isFlying || isInsideZone(ZoneId.WATER);
|
|
||||||
double delta = (dx * dx) + (dy * dy);
|
double delta = (dx * dx) + (dy * dy);
|
||||||
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
|
final boolean isFloating = _isFlying || (isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE));
|
||||||
&& !isFloating)
|
if (!isFloating && (delta < 10000) && ((dz * dz) > 2500)) // Close enough, allows error between client and server geodata if it cannot be avoided.
|
||||||
{
|
{
|
||||||
delta = Math.sqrt(delta);
|
delta = Math.sqrt(delta);
|
||||||
}
|
}
|
||||||
@@ -3365,7 +3352,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
m._yAccurate += dy * distFraction;
|
m._yAccurate += dy * distFraction;
|
||||||
|
|
||||||
// Set the position of the Creature to estimated after parcial move
|
// Set the position of the Creature to estimated after parcial move
|
||||||
super.setXYZ((int) (m._xAccurate), (int) (m._yAccurate), zPrev + (int) ((dz * distFraction) + 0.5));
|
super.setXYZ((int) m._xAccurate, (int) m._yAccurate, zPrev + (int) ((dz * distFraction) + 0.5));
|
||||||
}
|
}
|
||||||
revalidateZone(false);
|
revalidateZone(false);
|
||||||
|
|
||||||
@@ -3567,7 +3554,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
// Make water move short and use no geodata checks for swimming chars distance in a click can easily be over 3000.
|
||||||
final boolean isInWater = isInsideZone(ZoneId.WATER);
|
final boolean isInWater = isInsideZone(ZoneId.WATER) && !isInsideZone(ZoneId.CASTLE);
|
||||||
if (isInWater && (distance > 700))
|
if (isInWater && (distance > 700))
|
||||||
{
|
{
|
||||||
final double divider = 700 / distance;
|
final double divider = 700 / distance;
|
||||||
|
|||||||
Reference in New Issue
Block a user