From 74a5464a7932b9790cbb1a569cc1e6224251e5fb Mon Sep 17 00:00:00 2001 From: Joshua Thome Date: Mon, 4 Nov 2024 13:17:21 -0600 Subject: [PATCH] Coalesce to Vector3.zero if attention point offset not specified --- NewHorizons/Builder/Props/DialogueBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Builder/Props/DialogueBuilder.cs b/NewHorizons/Builder/Props/DialogueBuilder.cs index 1459230f..8bd12c86 100644 --- a/NewHorizons/Builder/Props/DialogueBuilder.cs +++ b/NewHorizons/Builder/Props/DialogueBuilder.cs @@ -343,7 +343,7 @@ namespace NewHorizons.Builder.Props { var ptGo = GeneralPropBuilder.MakeNew("AttentionPoint", go, sector, info.attentionPoint, defaultParent: dialogue.transform); dialogue._attentionPoint = ptGo.transform; - dialogue._attentionPointOffset = info.attentionPoint.offset; + dialogue._attentionPointOffset = info.attentionPoint.offset ?? Vector3.zero; ptGo.SetActive(true); } if (info.swappedAttentionPoints != null && info.swappedAttentionPoints.Length > 0) @@ -354,7 +354,7 @@ namespace NewHorizons.Builder.Props var swapper = ptGo.AddComponent(); swapper._dialogueTree = dialogue; swapper._attentionPoint = ptGo.transform; - swapper._attentionPointOffset = pointInfo.offset; + swapper._attentionPointOffset = pointInfo.offset ?? Vector3.zero; swapper._nodeName = pointInfo.dialogueNode; swapper._dialoguePage = pointInfo.dialoguePage; swapper._lookEasing = pointInfo.lookEasing;