state_entry is now executed on state change.
parent
9a04e0e1c4
commit
44058f8ae6
|
@ -73,7 +73,18 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
public string State
|
public string State
|
||||||
{
|
{
|
||||||
get { return m_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
|
// Object never expires
|
||||||
|
|
|
@ -83,6 +83,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
||||||
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "changed", EventQueueManager.llDetectNull, new object[] { (int)change });
|
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)
|
public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
// Add to queue for all scripts in ObjectID object
|
// Add to queue for all scripts in ObjectID object
|
||||||
|
|
Loading…
Reference in New Issue