Remove redundant checks
This commit is contained in:
parent
5eef40f767
commit
8f13d9295c
@ -84,16 +84,14 @@ public class Ghost extends MovableEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (currentPath != null) {
|
if (currentPath != null) {
|
||||||
|
if (!currentPath.finished()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (currentPath instanceof EnterGhostHousePath) {
|
if (currentPath instanceof EnterGhostHousePath) {
|
||||||
if (!currentPath.finished()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
currentPath = new ExitGhostHousePath(pos);
|
currentPath = new ExitGhostHousePath(pos);
|
||||||
returned = true;
|
returned = true;
|
||||||
} else if (currentPath instanceof ExitGhostHousePath) {
|
} else if (currentPath instanceof ExitGhostHousePath) {
|
||||||
if (!currentPath.finished()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
speed = GHOST_SPEED;
|
speed = GHOST_SPEED;
|
||||||
currentBehaviour = chaseBehaviour;
|
currentBehaviour = chaseBehaviour;
|
||||||
currentPath = null;
|
currentPath = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user