From 8b99511d09a5afae9dd1ac4a60d53e2972341f86 Mon Sep 17 00:00:00 2001 From: Toad06 Date: Fri, 7 Jun 2024 19:35:43 +0200 Subject: [PATCH] Make `sequence_instance` hold `undefined` instead of `null` when the instance is not controlled by a sequence --- scripts/yyInstance.js | 2 +- scripts/yySequence.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/yyInstance.js b/scripts/yyInstance.js index 1d8dc5ce..a99b3dd7 100644 --- a/scripts/yyInstance.js +++ b/scripts/yyInstance.js @@ -124,7 +124,7 @@ function yyInstance( _xx, _yy, _id, _objectind, _AddObjectLink, _create_dummy this.fOutsideRoom = false; this.fInSequence = false; this.fOwnedBySequence = false; - this.m_pControllingSeqInst = null; + this.m_pControllingSeqInst = undefined; this.fControlledBySequence = false; this.fDrawnBySequence = true; diff --git a/scripts/yySequence.js b/scripts/yySequence.js index 706a558f..4223d567 100644 --- a/scripts/yySequence.js +++ b/scripts/yySequence.js @@ -6681,7 +6681,7 @@ CSequenceInstance.prototype.CleanupInstances = function () { pInst.SetInSequence(false); pInst.SetControlledBySequence(false); - pInst.SetControllingSeqInst(null); + pInst.SetControllingSeqInst(undefined); if (pInstInfo.ownedBySequence == true) { @@ -6753,7 +6753,7 @@ CSequenceInstance.prototype.SetInstanceInSequenceStatus = function (_inSequence) } else { - pInst.SetControllingSeqInst(null); + pInst.SetControllingSeqInst(undefined); } } }