From 2d93b9cae246e475ced6ef9626bc6bdde23eaaaa Mon Sep 17 00:00:00 2001 From: Joseph Humfrey Date: Thu, 9 Mar 2017 17:21:11 +0000 Subject: [PATCH] Oops, last change un-did a previous fix --- ink-engine-runtime/StoryState.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ink-engine-runtime/StoryState.cs b/ink-engine-runtime/StoryState.cs index 4639a494..727a3cac 100755 --- a/ink-engine-runtime/StoryState.cs +++ b/ink-engine-runtime/StoryState.cs @@ -810,6 +810,10 @@ internal void StartExternalFunctionEvaluation (Container funcContainer, params o callStack = new CallStack (funcContainer); callStack.currentElement.type = PushPopType.Function; + // Change the callstack the variableState is looking at to be + // this temporary function evaluation one. We'll restore it afterwards + variablesState.callStack = callStack; + // By setting ourselves in external function evaluation mode, // we're saying it's okay to end the flow without a Done or End, // but with a ~ return instead.