Additional door checks when moving.
This commit is contained in:
parent
b72bef5c61
commit
fb5a0626cd
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3056,7 +3056,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3056,7 +3056,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3056,7 +3056,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -5106,7 +5106,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -5152,7 +5152,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3991,7 +3991,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3993,7 +3993,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3070,7 +3070,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3070,7 +3070,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3069,7 +3069,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3057,7 +3057,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3072,7 +3072,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
@ -3079,7 +3079,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
{
|
||||
final double distance = Math.hypot(dx, dy);
|
||||
if (_cursorKeyMovement // In case of cursor movement, avoid moving through obstacles.
|
||||
|| (distance > 3000)) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| (distance > 3000) // Stop movement when player has clicked far away and intersected with an obstacle.
|
||||
|| ((getWorldRegion() != null) && !getWorldRegion().getDoors().isEmpty())) // Check for nearby doors.
|
||||
{
|
||||
final double angle = Util.convertHeadingToDegree(getHeading());
|
||||
final double radian = Math.toRadians(angle);
|
||||
|
Loading…
Reference in New Issue
Block a user