From 8741676bc3681e2045084e17f86196693d9156d3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 3 Dec 2010 18:32:03 +0100 Subject: Revert "Revert "Trigger changed event with CHANGED_TELEPORT when teleporting to another region."" This reverts commit 6c01ebb87541ecf66d678606bb97d996bee51953. --- .../Region/ScriptEngine/Interfaces/IScriptInstance.cs | 3 ++- .../ScriptEngine/Shared/Instance/ScriptInstance.cs | 17 ++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs index 0c99d8c..8b7871b 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs @@ -42,7 +42,8 @@ namespace OpenSim.Region.ScriptEngine.Interfaces NewRez = 1, PrimCrossing = 2, ScriptedRez = 3, - AttachedRez = 4 + AttachedRez = 4, + Teleporting = 5 } public interface IScriptWorkItem diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 5288cd3..9548253 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -391,19 +391,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance } else if (m_stateSource == StateSource.RegionStart) { -// m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script"); + //m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script"); PostEvent(new EventParams("changed", - new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION_RESTART) }, - new DetectParams[0])); + new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION_RESTART) }, new DetectParams[0])); } - else if (m_stateSource == StateSource.PrimCrossing) + else if (m_stateSource == StateSource.PrimCrossing || m_stateSource == StateSource.Teleporting) { // CHANGED_REGION PostEvent(new EventParams("changed", - new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION) }, - new DetectParams[0])); + new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION) }, new DetectParams[0])); + + // CHANGED_TELEPORT + if (m_stateSource == StateSource.Teleporting) + PostEvent(new EventParams("changed", + new Object[] { new LSL_Types.LSLInteger((int)Changed.TELEPORT) }, new DetectParams[0])); } - } + } else { Start(); -- cgit v1.1