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)
|
||||
{
|
||||
// The only events that persist across state changes are timers
|
||||
if (m_StateChangeInProgress && data.EventName != "timer")
|
||||
return;
|
||||
|
||||
if (EventQueue.Count >= m_MaxScriptQueue)
|
||||
return;
|
||||
|
||||
|
@ -720,9 +724,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
|||
m_CollisionInQueue = true;
|
||||
}
|
||||
|
||||
// The only events that persist across state changes are timers
|
||||
if (m_StateChangeInProgress && data.EventName != "timer") return;
|
||||
|
||||
EventQueue.Enqueue(data);
|
||||
|
||||
if (m_CurrentWorkItem == null)
|
||||
|
|
Loading…
Reference in New Issue