mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Coalesce to Vector3.zero if attention point offset not specified
This commit is contained in:
parent
8e7e85d9a1
commit
74a5464a79
@ -343,7 +343,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
{
|
{
|
||||||
var ptGo = GeneralPropBuilder.MakeNew("AttentionPoint", go, sector, info.attentionPoint, defaultParent: dialogue.transform);
|
var ptGo = GeneralPropBuilder.MakeNew("AttentionPoint", go, sector, info.attentionPoint, defaultParent: dialogue.transform);
|
||||||
dialogue._attentionPoint = ptGo.transform;
|
dialogue._attentionPoint = ptGo.transform;
|
||||||
dialogue._attentionPointOffset = info.attentionPoint.offset;
|
dialogue._attentionPointOffset = info.attentionPoint.offset ?? Vector3.zero;
|
||||||
ptGo.SetActive(true);
|
ptGo.SetActive(true);
|
||||||
}
|
}
|
||||||
if (info.swappedAttentionPoints != null && info.swappedAttentionPoints.Length > 0)
|
if (info.swappedAttentionPoints != null && info.swappedAttentionPoints.Length > 0)
|
||||||
@ -354,7 +354,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
var swapper = ptGo.AddComponent<DialogueAttentionPointSwapper>();
|
var swapper = ptGo.AddComponent<DialogueAttentionPointSwapper>();
|
||||||
swapper._dialogueTree = dialogue;
|
swapper._dialogueTree = dialogue;
|
||||||
swapper._attentionPoint = ptGo.transform;
|
swapper._attentionPoint = ptGo.transform;
|
||||||
swapper._attentionPointOffset = pointInfo.offset;
|
swapper._attentionPointOffset = pointInfo.offset ?? Vector3.zero;
|
||||||
swapper._nodeName = pointInfo.dialogueNode;
|
swapper._nodeName = pointInfo.dialogueNode;
|
||||||
swapper._dialoguePage = pointInfo.dialoguePage;
|
swapper._dialoguePage = pointInfo.dialoguePage;
|
||||||
swapper._lookEasing = pointInfo.lookEasing;
|
swapper._lookEasing = pointInfo.lookEasing;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user