Skip to content

Commit f9ecbfa

Browse files
feat: add fixed rotation for Survival and Event NPCs
- Implemented `fixedRotation` using yaw and pitch from `lobbyConfig`. - Set `NpcRotationType` to `FIXED` for both NPCs.
1 parent 1188028 commit f9ecbfa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/kotlin/dev/slne/surf/lobby/npc/SurfNpcHook.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ object SurfNpcHook {
4646
z = lobbyConfig.survivalNpc.z
4747
}
4848

49+
fixedRotation = surfNpcApi.createRotation(
50+
lobbyConfig.survivalNpc.yaw,
51+
lobbyConfig.survivalNpc.pitch
52+
)
4953
rotationType = NpcRotationType.FIXED
5054
}.getOrNull() ?: error("Failed to create survival NPC")
5155
}
@@ -67,6 +71,8 @@ object SurfNpcHook {
6771
z = lobbyConfig.eventNpc.z
6872
}
6973

74+
fixedRotation =
75+
surfNpcApi.createRotation(lobbyConfig.eventNpc.yaw, lobbyConfig.eventNpc.pitch)
7076
rotationType = NpcRotationType.FIXED
7177
}.getOrNull() ?: error("Failed to create survival NPC")
7278
}

0 commit comments

Comments
 (0)