aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorsyeyoung <cyougn06@naver.com>2022-01-26 21:44:02 +0900
committersyeyoung <cyougn06@naver.com>2022-01-26 21:44:02 +0900
commit7880ca8205967bd4771fcdfbb897e0ef6e37e82e (patch)
tree7cadac10f7bcbddc473db16effccd4054c33773b /src/main/java
parent7ed943c6f0443d01a93c506af124bbca95107252 (diff)
downloadSkyblock-Dungeons-Guide-7880ca8205967bd4771fcdfbb897e0ef6e37e82e.tar.gz
Skyblock-Dungeons-Guide-7880ca8205967bd4771fcdfbb897e0ef6e37e82e.tar.bz2
Skyblock-Dungeons-Guide-7880ca8205967bd4771fcdfbb897e0ef6e37e82e.zip
- Very subtle typo in pathfind logic
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/pathfinding/JPSPathfinder.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/JPSPathfinder.java b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/JPSPathfinder.java
index c8ae3a81..6c88d4cf 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/JPSPathfinder.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/pathfinding/JPSPathfinder.java
@@ -191,30 +191,30 @@ public class JPSPathfinder {
}
if (dungeonRoom.isBlocked(x, y-dy, z)) {
nexts.add(openNode(x, y-dy, nz));
- if (dungeonRoom.isBlocked(x+1, y-dy, z))nexts.add(openNode(x+1, y-dy, nz));
- if (dungeonRoom.isBlocked(x-1, y-dy, z))nexts.add(openNode(x+1, y-dy, nz));
+ if (dungeonRoom.isBlocked(x+1, y-dy, z)) nexts.add(openNode(x+1, y-dy, nz));
+ if (dungeonRoom.isBlocked(x-1, y-dy, z)) nexts.add(openNode(x+1, y-dy, nz));
}
} else if (dy == 0) {
if (dungeonRoom.isBlocked(x, y, z-dz)) {
- nexts.add(openNode(x, ny, z-dz));
+ nexts.add(openNode(nx, y, z-dz));
if (dungeonRoom.isBlocked(x, y+1, z-dz)) nexts.add(openNode(nx, y+1, z-dz));
if (dungeonRoom.isBlocked(x, y-1, z-dz)) nexts.add(openNode(nx, y-1, z-dz));
}
if (dungeonRoom.isBlocked(x-dx, y, z)) {
nexts.add(openNode(x-dx, y, nz));
- if (dungeonRoom.isBlocked(x-dx, y+1, z))nexts.add(openNode(x-dx, y+1, nz));
- if (dungeonRoom.isBlocked(x-dx, y-1, z))nexts.add(openNode(x-dx, y-1, nz));
+ if (dungeonRoom.isBlocked(x-dx, y+1, z)) nexts.add(openNode(x-dx, y+1, nz));
+ if (dungeonRoom.isBlocked(x-dx, y-1, z)) nexts.add(openNode(x-dx, y-1, nz));
}
} else if (dz == 0) {
if (dungeonRoom.isBlocked(x, y-dy, z)) {
nexts.add(openNode(nx, y-dy, z));
- if (dungeonRoom.isBlocked(x, y-dy, z+1))nexts.add(openNode(nx, y-dy, z+1));
- if (dungeonRoom.isBlocked(x, y-dy, z-1))nexts.add(openNode(nx, y-dy, z-1));
+ if (dungeonRoom.isBlocked(x, y-dy, z+1)) nexts.add(openNode(nx, y-dy, z+1));
+ if (dungeonRoom.isBlocked(x, y-dy, z-1)) nexts.add(openNode(nx, y-dy, z-1));
}
if (dungeonRoom.isBlocked(x-dx, y, z)) {
nexts.add(openNode(x-dx, ny, z));
- if (dungeonRoom.isBlocked(x-dx, y, z+1))nexts.add(openNode(x-dx, ny, z+1));
- if (dungeonRoom.isBlocked(x-dx, y, z-1))nexts.add(openNode(x-dx, ny, z-1));
+ if (dungeonRoom.isBlocked(x-dx, y, z+1)) nexts.add(openNode(x-dx, ny, z+1));
+ if (dungeonRoom.isBlocked(x-dx, y, z-1)) nexts.add(openNode(x-dx, ny, z-1));
}
}
} else if (determinant == 3) {