From 490ac0be005a989c86ebde62aad137fd2da7cbd8 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 8 Sep 2008 02:40:20 +0000 Subject: Implement proper persistence of the following prim properties: Floating text, Rotation, Texture animation, Particle System This will make "Eye Candy" scripts work without modification in XEngine. The use of the CHANGED_REGION_RESTART hack is no longer needed. Implemented in MySQL only, hovertext also in SQLite. --- .../Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 08f9545..30002e8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -74,6 +74,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance private bool m_InSelfDelete = false; private int m_MaxScriptQueue; private bool m_SaveState = true; + private bool m_ShuttingDown = false; private Dictionary m_Apis = new Dictionary(); @@ -88,6 +89,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance set { m_RunEvents = value; } } + public bool ShuttingDown + { + get { return m_ShuttingDown; } + set { m_ShuttingDown = value; } + } + public string State { get { return m_State; } @@ -248,7 +255,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance m_Engine.Log.DebugFormat("[Script] Successfully retrieved state for script {0}.{1}", m_PrimName, m_ScriptName); - if (m_RunEvents) + if (m_RunEvents && (!m_ShuttingDown)) { m_RunEvents = false; Start(); @@ -517,7 +524,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance { lock (m_EventQueue) { - if ((m_EventQueue.Count > 0) && m_RunEvents) + if ((m_EventQueue.Count > 0) && m_RunEvents && (!m_ShuttingDown)) { m_CurrentResult=m_Engine.QueueEventHandler(this); } @@ -564,7 +571,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance lock (m_EventQueue) { - if ((m_EventQueue.Count > 0) && m_RunEvents) + if ((m_EventQueue.Count > 0) && m_RunEvents && (!m_ShuttingDown)) { m_CurrentResult = m_Engine.QueueEventHandler(this); } -- cgit v1.1