fix missing clear of queued timer even and state transition flags on scripts reset

avinationmerge
UbitUmarov 2015-10-01 05:20:04 +01:00
parent 6df75a927c
commit 7e8544f26e
1 changed files with 7 additions and 0 deletions

View File

@ -1018,11 +1018,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
part.Inventory.GetInventoryItem(ItemID).PermsGranter = UUID.Zero; part.Inventory.GetInventoryItem(ItemID).PermsGranter = UUID.Zero;
part.CollisionSound = UUID.Zero; part.CollisionSound = UUID.Zero;
AsyncCommandManager.RemoveScript(Engine, LocalID, ItemID); AsyncCommandManager.RemoveScript(Engine, LocalID, ItemID);
m_TimerQueued = false;
m_StateChangeInProgress = false;
EventQueue.Clear(); EventQueue.Clear();
m_Script.ResetVars(); m_Script.ResetVars();
StartParam = 0; StartParam = 0;
State = "default"; State = "default";
part.SetScriptEvents(ItemID, part.SetScriptEvents(ItemID,
(int)m_Script.GetStateEventFlags(State)); (int)m_Script.GetStateEventFlags(State));
if (running) if (running)
@ -1049,6 +1054,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
part.CollisionSound = UUID.Zero; part.CollisionSound = UUID.Zero;
AsyncCommandManager.RemoveScript(Engine, LocalID, ItemID); AsyncCommandManager.RemoveScript(Engine, LocalID, ItemID);
m_TimerQueued = false;
m_StateChangeInProgress = false;
EventQueue.Clear(); EventQueue.Clear();
m_Script.ResetVars(); m_Script.ResetVars();
string oldState = State; string oldState = State;