Improved movement while flying.
This commit is contained in:
@@ -740,7 +740,7 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
}
|
||||
|
||||
// Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
|
||||
final Location moveLoc = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceId());
|
||||
final Location moveLoc = _actor.isFlying() ? new Location(x1, y1, z1) : GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), x1, y1, z1, npc.getInstanceId());
|
||||
|
||||
moveTo(moveLoc.getX(), moveLoc.getY(), moveLoc.getZ());
|
||||
}
|
||||
|
@@ -359,7 +359,7 @@ public class GeoEngine
|
||||
*/
|
||||
public final boolean canSeeTarget(L2Object origin, L2Object target)
|
||||
{
|
||||
if (target.isDoor())
|
||||
if (target.isDoor() || (target.isCharacter() && ((L2Character) target).isFlying()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@@ -2631,7 +2631,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
{
|
||||
return _isFlying || isStunned() || isSleeping() || isAttackingNow() || isAlikeDead() || isParalyzed() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isStunned() || isSleeping() || isAttackingNow() || isAlikeDead() || isParalyzed() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
}
|
||||
|
||||
public final Calculator[] getCalculators()
|
||||
@@ -3931,7 +3931,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
// Z coordinate will follow client values
|
||||
dz = m._zDestination - zPrev;
|
||||
|
||||
if (isPlayer())
|
||||
if (isPlayer() && !_isFlying)
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|
Reference in New Issue
Block a user