diff options
author | Melanie Thielker | 2008-09-08 22:19:06 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-08 22:19:06 +0000 |
commit | 1034c1cdc1a75b6e37a266e15048b9f9ab965b04 (patch) | |
tree | fae96225599ab434aef75322704eca257b8a58f4 /OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |
parent | fix an issue where we got coliding namespaces that prevented a sim start (diff) | |
download | opensim-SC-1034c1cdc1a75b6e37a266e15048b9f9ab965b04.zip opensim-SC-1034c1cdc1a75b6e37a266e15048b9f9ab965b04.tar.gz opensim-SC-1034c1cdc1a75b6e37a266e15048b9f9ab965b04.tar.bz2 opensim-SC-1034c1cdc1a75b6e37a266e15048b9f9ab965b04.tar.xz |
Correct state handling and state event masks. Prims will now show
touch, pay, etc script states correctly.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 30002e8..24813b0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -255,6 +255,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
255 | 255 | ||
256 | m_Engine.Log.DebugFormat("[Script] Successfully retrieved state for script {0}.{1}", m_PrimName, m_ScriptName); | 256 | m_Engine.Log.DebugFormat("[Script] Successfully retrieved state for script {0}.{1}", m_PrimName, m_ScriptName); |
257 | 257 | ||
258 | part.SetScriptEvents(m_ItemID, | ||
259 | (int)m_Script.GetStateEventFlags(State)); | ||
260 | |||
258 | if (m_RunEvents && (!m_ShuttingDown)) | 261 | if (m_RunEvents && (!m_ShuttingDown)) |
259 | { | 262 | { |
260 | m_RunEvents = false; | 263 | m_RunEvents = false; |
@@ -612,6 +615,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
612 | m_EventQueue.Clear(); | 615 | m_EventQueue.Clear(); |
613 | m_Script.ResetVars(); | 616 | m_Script.ResetVars(); |
614 | m_State = "default"; | 617 | m_State = "default"; |
618 | |||
619 | part.SetScriptEvents(m_ItemID, | ||
620 | (int)m_Script.GetStateEventFlags(State)); | ||
615 | if (running) | 621 | if (running) |
616 | Start(); | 622 | Start(); |
617 | m_SaveState = true; | 623 | m_SaveState = true; |
@@ -631,6 +637,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
631 | part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero; | 637 | part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero; |
632 | AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; | 638 | AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; |
633 | async.RemoveScript(m_LocalID, m_ItemID); | 639 | async.RemoveScript(m_LocalID, m_ItemID); |
640 | |||
641 | m_EventQueue.Clear(); | ||
642 | m_Script.ResetVars(); | ||
643 | m_State = "default"; | ||
644 | |||
645 | part.SetScriptEvents(m_ItemID, | ||
646 | (int)m_Script.GetStateEventFlags(State)); | ||
647 | |||
634 | if (m_CurrentEvent != "state_entry") | 648 | if (m_CurrentEvent != "state_entry") |
635 | { | 649 | { |
636 | m_SaveState = true; | 650 | m_SaveState = true; |