Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a6ef395

Browse files
committed
Fixed meshes with Walk and Pysical intentions were treated as physical only.
1 parent 047b163 commit a6ef395

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/main/java/com/aionemu/geobuilder/CollisionIntention.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ public enum CollisionIntention {
88
WALK(1 << 3), // Walk/NoWalk obstacles
99
DOOR(1 << 4), // Doors which have a state opened/closed
1010
EVENT(1 << 5), // Appear on event only
11-
MOVEABLE(1 << 6); // Ships, shugo boxes
11+
MOVEABLE(1 << 6), // Ships, shugo boxes
12+
PHYSICAL_SEE_THROUGH(1 << 7);
1213

1314
private final short id;
1415

src/main/java/com/aionemu/geobuilder/loaders/CgfLoader.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,10 +701,11 @@ private void traverseNodesInternal(int recursiveDepth, List<MeshData> meshes, Li
701701
meshData.materialId = matData.materialId;
702702
}
703703
if (matData.materialId >= 1 && matData.materialId <= 9) {
704-
if (matData.materialId > 5) {
705-
meshData.collisionIntention = 0;
704+
meshData.collisionIntention = 0;
705+
if (matData.materialId <= 5) {
706+
meshData.collisionIntention |= CollisionIntention.PHYSICAL_SEE_THROUGH.getId(); // players and npcs cant move but see through
706707
}
707-
meshData.collisionIntention |= CollisionIntention.WALK.getId();
708+
meshData.collisionIntention |= CollisionIntention.WALK.getId(); // npcs cannot walk through
708709
}
709710
meshes.add(meshData);
710711
}

0 commit comments

Comments
 (0)