From b8157174ca06995079a1680ab7f2c7929e2abde8 Mon Sep 17 00:00:00 2001 From: Freaky Tech Date: Mon, 2 Mar 2015 20:59:02 +0100 Subject: corrected llResetScript according to description within LSL wiki Signed-off-by: BlueWall --- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') 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 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", -- cgit v1.1