aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorTedd Hansen2008-02-10 22:36:01 +0000
committerTedd Hansen2008-02-10 22:36:01 +0000
commit44058f8ae6c02d01350bfe16c8ee00017d949fcc (patch)
tree4be3881cd4fc8f9035d5936b29c8c0a929c7ad49 /OpenSim/Region
parentWe now support LSL state (diff)
downloadopensim-SC-44058f8ae6c02d01350bfe16c8ee00017d949fcc.zip
opensim-SC-44058f8ae6c02d01350bfe16c8ee00017d949fcc.tar.gz
opensim-SC-44058f8ae6c02d01350bfe16c8ee00017d949fcc.tar.bz2
opensim-SC-44058f8ae6c02d01350bfe16c8ee00017d949fcc.tar.xz
state_entry is now executed on state change.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs6
2 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index ca7a2bd..2fc610a 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -73,7 +73,18 @@ namespace OpenSim.Region.ScriptEngine.Common
73 public string State 73 public string State
74 { 74 {
75 get { return m_state; } 75 get { return m_state; }
76 set { m_state = value; } 76 set {
77 bool changed = false;
78 if (m_state != value)
79 changed = true;
80 // Set it
81 m_state = value;
82
83 if (changed)
84 {
85 m_ScriptEngine.m_EventManager.state_entry(m_localID);
86 }
87 }
77 } 88 }
78 89
79 // Object never expires 90 // Object never expires
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
index 1de010a..607a4ff 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
@@ -83,6 +83,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
83 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "changed", EventQueueManager.llDetectNull, new object[] { (int)change }); 83 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "changed", EventQueueManager.llDetectNull, new object[] { (int)change });
84 } 84 }
85 85
86 public void state_entry(uint localID)
87 {
88 // Add to queue for all scripts in ObjectID object
89 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_entry", EventQueueManager.llDetectNull, new object[] { });
90 }
91
86 public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) 92 public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
87 { 93 {
88 // Add to queue for all scripts in ObjectID object 94 // Add to queue for all scripts in ObjectID object