mirror of
https://github.com/opensim/opensim.git
synced 2026-07-15 12:05:49 +08:00
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.)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -719,9 +723,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user