From 3e1441afe1972a153b442bc30dbcf0ee28e0a41f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 9 Sep 2008 01:24:58 +0000 Subject: [PATCH] Fix state xxx within state xxx itself triggering a state "change" to same state --- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 24813b0915..97c79b5a51 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -413,6 +413,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance public void SetState(string state) { + if (state == State) + return; + PostEvent(new EventParams("state_exit", new Object[0], new DetectParams[0])); PostEvent(new EventParams("state", new Object[] { state },