Move state change in progress in ScriptInstance.PostEvent() to the top of the EventQueue lock to avoid some flags possibly being wrongly set (m_LastControlLevel, etc.)
parent
7410924de0
commit
3a7d42378f
|
@ -676,6 +676,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
|
|
||||||
lock (EventQueue)
|
lock (EventQueue)
|
||||||
{
|
{
|
||||||
|
// The only events that persist across state changes are timers
|
||||||
|
if (m_StateChangeInProgress && data.EventName != "timer")
|
||||||
|
return;
|
||||||
|
|
||||||
if (EventQueue.Count >= m_MaxScriptQueue)
|
if (EventQueue.Count >= m_MaxScriptQueue)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -719,9 +723,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
|
|
||||||
m_CollisionInQueue = true;
|
m_CollisionInQueue = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The only events that persist across state changes are timers
|
|
||||||
if (m_StateChangeInProgress && data.EventName != "timer") return;
|
|
||||||
|
|
||||||
EventQueue.Enqueue(data);
|
EventQueue.Enqueue(data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue