From 41ce19836b9f44482c1beaf5ce66a996756d80f6 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 15 Mar 2012 01:32:16 +0000 Subject: Simplify some logic in the ScriptInstance constructor - running is set to false in both if/else branches --- .../Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index afa9191..8b0dbaa 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -363,15 +363,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance part.SetScriptEvents(m_ItemID, (int)m_Script.GetStateEventFlags(State)); - if (Running && (!m_ShuttingDown)) - { - Running = false; - } - else - { - Running = false; + Running = false; + + if (m_ShuttingDown) m_startOnInit = false; - } // we get new rez events on sim restart, too // but if there is state, then we fire the change @@ -380,7 +375,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance // We loaded state, don't force a re-save m_SaveState = false; m_startedFromSavedState = true; - } } else -- cgit v1.1