-
Notifications
You must be signed in to change notification settings - Fork 1
feat: move culled NPCs to their routine waypoint on schedule change#376
feat: move culled NPCs to their routine waypoint on schedule change #376BoroBongo wants to merge 5 commits into
Conversation
NpcRoutineService.CalculateCurrentRoutine now calls NotifyNpcRoutineChanged when the active routine slot changes, moving the culling sphere (and unloaded GO) to the new waypoint so off-screen NPCs progress their daily schedule. RecalculateAllNpcRoutines() iterates every NPC container and can be called after a time skip to synchronise all culled NPCs at once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is never called. Remove if unused (Especially as it can be a performance bottleneck).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is never called. Remove if unused (Especially as it can be a performance bottleneck).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is never called. Remove if unused (Especially as it can be a performance bottleneck).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing line of code. Good finding. :-)
Uh oh!
There was an error while loading. Please reload this page.
NpcRoutineService.CalculateCurrentRoutine now calls NotifyNpcRoutineChanged when the active routine slot changes, moving the culling sphere (and unloaded GO) to the new waypoint so off-screen NPCs progress their daily schedule. RecalculateAllNpcRoutines() iterates every NPC container and can be called after a time skip to synchronise all culled NPCs at once.
Summary
NpcMeshCullingDomainandNpcMeshCullingServicecoordinate withNpcRoutineServiceto apply the waypoint update without enabling the NPC's full GameObjectHow to test