Hotfix players getting stuck after obstacles

This commit is contained in:
Ceikry
2022-10-10 15:14:19 +00:00
committed by Ryan
parent 121f8d2723
commit 0a014e86f3
@@ -115,11 +115,11 @@ public class ForceMovement extends Pulse {
* @param speed The path speed.
*/
public ForceMovement(Entity e, Location start, Location end, Animation animation, int speed) {
this(e, start, end, WALK_ANIMATION, animation, direction(start, end), WALKING_SPEED, speed, false);
this(e, start, end, WALK_ANIMATION, animation, direction(start, end), WALKING_SPEED, speed, true);
}
public ForceMovement(Entity e, Location destination, int startSpeed, int animSpeed){
this(e,e.getLocation(),destination,WALK_ANIMATION,WALK_ANIMATION,direction(e.getLocation(),destination),startSpeed,animSpeed, false);
this(e,e.getLocation(),destination,WALK_ANIMATION,WALK_ANIMATION,direction(e.getLocation(),destination),startSpeed,animSpeed, true);
}
/**
@@ -130,7 +130,7 @@ public class ForceMovement extends Pulse {
* @param animation the animation.
*/
public ForceMovement(Entity e, Location start, Location destination, Animation animation) {
this(e, start, destination, WALK_ANIMATION, animation, direction(start, destination), WALKING_SPEED, WALKING_SPEED, false);
this(e, start, destination, WALK_ANIMATION, animation, direction(start, destination), WALKING_SPEED, WALKING_SPEED, true);
}
/**
@@ -140,7 +140,7 @@ public class ForceMovement extends Pulse {
* @param animation the animation.
*/
public ForceMovement(Location start, Location destination, Animation animation) {
this(null, start, destination, WALK_ANIMATION, animation, direction(start, destination), WALKING_SPEED, WALKING_SPEED, false);
this(null, start, destination, WALK_ANIMATION, animation, direction(start, destination), WALKING_SPEED, WALKING_SPEED, true);
}
/**
@@ -150,7 +150,7 @@ public class ForceMovement extends Pulse {
* @return The created ForceMovement object.
*/
public static ForceMovement run(Entity e, Location destination) {
return run(e, e.getLocation(), destination, WALK_ANIMATION, WALK_ANIMATION, direction(e.getLocation(), destination), WALKING_SPEED, WALKING_SPEED, false);
return run(e, e.getLocation(), destination, WALK_ANIMATION, WALK_ANIMATION, direction(e.getLocation(), destination), WALKING_SPEED, WALKING_SPEED, true);
}
/**
@@ -161,7 +161,7 @@ public class ForceMovement extends Pulse {
* @return The created ForceMovement object.
*/
public static ForceMovement run(Entity e, Location start, Location destination) {
return run(e, start, destination, WALK_ANIMATION, WALK_ANIMATION, direction(e.getLocation(), destination), WALKING_SPEED, WALKING_SPEED, false);
return run(e, start, destination, WALK_ANIMATION, WALK_ANIMATION, direction(e.getLocation(), destination), WALKING_SPEED, WALKING_SPEED, true);
}
/**
@@ -173,7 +173,7 @@ public class ForceMovement extends Pulse {
* @return The created ForceMovement object.
*/
public static ForceMovement run(Entity e, Location start, Location destination, Animation animation) {
return run(e, start, destination, WALK_ANIMATION, animation, direction(start, destination), WALKING_SPEED, WALKING_SPEED, false);
return run(e, start, destination, WALK_ANIMATION, animation, direction(start, destination), WALKING_SPEED, WALKING_SPEED, true);
}
/**
@@ -186,7 +186,7 @@ public class ForceMovement extends Pulse {
* @return The created ForceMovement object.
*/
public static ForceMovement run(Entity e, Location start, Location destination, Animation animation, int speed) {
return run(e, start, destination, WALK_ANIMATION, animation, direction(start, destination), WALKING_SPEED, speed, false);
return run(e, start, destination, WALK_ANIMATION, animation, direction(start, destination), WALKING_SPEED, speed, true);
}
/**
@@ -198,7 +198,7 @@ public class ForceMovement extends Pulse {
* @return The created ForceMovement object.
*/
public static ForceMovement run(Entity e, Location start, Location destination, Animation startAnim, Animation animation) {
return run(e, start, destination, startAnim, animation, direction(start, destination), WALKING_SPEED, WALKING_SPEED, false);
return run(e, start, destination, startAnim, animation, direction(start, destination), WALKING_SPEED, WALKING_SPEED, true);
}
/**
@@ -211,7 +211,7 @@ public class ForceMovement extends Pulse {
* @return The created ForceMovement object.
*/
public static ForceMovement run(Entity e, Location start, Location destination, Animation startAnim, Animation animation, Direction direction) {
return run(e, start, destination, startAnim, animation, direction, WALKING_SPEED, WALKING_SPEED, false);
return run(e, start, destination, startAnim, animation, direction, WALKING_SPEED, WALKING_SPEED, true);
}
/**
@@ -225,11 +225,11 @@ public class ForceMovement extends Pulse {
* @return The created ForceMovement object.
*/
public static ForceMovement run(Entity e, Location start, Location destination, Animation startAnim, Animation animation, Direction direction, int pathSpeed) {
return run(e, start, destination, startAnim, animation, direction, WALKING_SPEED, pathSpeed, false);
return run(e, start, destination, startAnim, animation, direction, WALKING_SPEED, pathSpeed, true);
}
public static ForceMovement run(Entity e, Location start, Location destination, Animation startAnim, Animation animation, Direction direction, int commenceSpeed, int pathSpeed) {
return run(e, start, destination, startAnim, animation, direction, commenceSpeed, pathSpeed, false);
return run(e, start, destination, startAnim, animation, direction, commenceSpeed, pathSpeed, true);
}
/**
@@ -256,7 +256,7 @@ public class ForceMovement extends Pulse {
}
public static ForceMovement run(Entity e, Location destination, int commenceSpeed, int pathSpeed){
return run(e,e.getLocation(),destination,WALK_ANIMATION,WALK_ANIMATION,direction(e.getLocation(),destination),commenceSpeed,pathSpeed, false);
return run(e,e.getLocation(),destination,WALK_ANIMATION,WALK_ANIMATION,direction(e.getLocation(),destination),commenceSpeed,pathSpeed, true);
}
/**