From 1f438757119b50a7d83464403521cdcfd6d90d4c Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 15 Apr 2026 09:34:51 +0200 Subject: [PATCH] Handle null npcEntityId in setRuntimeDialogue --- src/runtime-three/runtime-host.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/runtime-three/runtime-host.ts b/src/runtime-three/runtime-host.ts index dfd622ef..da5793d8 100644 --- a/src/runtime-three/runtime-host.ts +++ b/src/runtime-three/runtime-host.ts @@ -760,12 +760,18 @@ export class RuntimeHost { } this.setRuntimeDialogue( - this.createRuntimeNpcDialogueState( - this.currentDialogue.npcEntityId, - dialogue.id, - nextLineIndex, - this.currentDialogue.source - ) + this.currentDialogue.npcEntityId === null + ? this.createRuntimeDialogueState( + dialogue.id, + nextLineIndex, + this.currentDialogue.source + ) + : this.createRuntimeNpcDialogueState( + this.currentDialogue.npcEntityId, + dialogue.id, + nextLineIndex, + this.currentDialogue.source + ) ); }