aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index d28b151..c06db05 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
970 970
971 EventQueue.Clear(); 971 EventQueue.Clear();
972 m_Script.ResetVars(); 972 m_Script.ResetVars();
973 string oldState = State;
973 State = "default"; 974 State = "default";
974 975
975 Part.SetScriptEvents(ItemID, 976 Part.SetScriptEvents(ItemID,
976 (int)m_Script.GetStateEventFlags(State)); 977 (int)m_Script.GetStateEventFlags(State));
977 978
978 if (m_CurrentEvent != "state_entry") 979 if (m_CurrentEvent != "state_entry" || oldState != "default")
979 { 980 {
980 m_SaveState = StatePersistedHere; 981 m_SaveState = StatePersistedHere;
981 PostEvent(new EventParams("state_entry", 982 PostEvent(new EventParams("state_entry",