diff --git a/source/simulation2/Simulation2.cpp b/source/simulation2/Simulation2.cpp index 26f740b016..eeb85ca5ee 100644 --- a/source/simulation2/Simulation2.cpp +++ b/source/simulation2/Simulation2.cpp @@ -430,6 +430,13 @@ void CSimulation2Impl::Update(int turnLength, const std::vectorGetScriptInterface()); + const JS::RootedValue initAttributesCloned(rq2.cx, Script::CloneValueFromOtherCompartment(m_SecondaryComponentManager->GetScriptInterface(), scriptInterface, m_InitAttributes)); + m_SecondaryComponentManager->GetScriptInterface().SetGlobal("InitAttributes", initAttributesCloned, true, true, true); + } + // Load the trigger scripts after we have loaded the simulation. { ScriptRequest rq2(m_SecondaryComponentManager->GetScriptInterface());