diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index d28b151dd3..c06db0562c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -970,12 +970,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance EventQueue.Clear(); m_Script.ResetVars(); + string oldState = State; State = "default"; Part.SetScriptEvents(ItemID, (int)m_Script.GetStateEventFlags(State)); - if (m_CurrentEvent != "state_entry") + if (m_CurrentEvent != "state_entry" || oldState != "default") { m_SaveState = StatePersistedHere; PostEvent(new EventParams("state_entry",