state_entry is now executed on state change.

ThreadPoolClientBranch
Tedd Hansen 2008-02-10 22:36:01 +00:00
parent 9a04e0e1c4
commit 44058f8ae6
2 changed files with 18 additions and 1 deletions

View File

@ -73,7 +73,18 @@ namespace OpenSim.Region.ScriptEngine.Common
public string State
{
get { return m_state; }
set { m_state = value; }
set {
bool changed = false;
if (m_state != value)
changed = true;
// Set it
m_state = value;
if (changed)
{
m_ScriptEngine.m_EventManager.state_entry(m_localID);
}
}
}
// Object never expires

View File

@ -83,6 +83,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "changed", EventQueueManager.llDetectNull, new object[] { (int)change });
}
public void state_entry(uint localID)
{
// Add to queue for all scripts in ObjectID object
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_entry", EventQueueManager.llDetectNull, new object[] { });
}
public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
{
// Add to queue for all scripts in ObjectID object