From eb5e39d6efed2516883c729eded38454d05aec68 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 12 Jul 2010 22:27:11 +0100 Subject: Fire CHANGED_MEDIA event if a media texture is set or cleared --- OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 5 +++++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 ++- OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 8699800..8bccab4 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs @@ -127,6 +127,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap part.Shape.Media[face] = me; UpdateMediaUrl(part); part.ScheduleFullUpdate(); + part.TriggerScriptChangedEvent(Changed.MEDIA); } public void ClearMediaEntry(SceneObjectPart part, int face) @@ -233,6 +234,8 @@ namespace OpenSim.Region.CoreModules.Media.Moap // Arguably, we could avoid sending a full update to the avatar that just changed the texture. part.ScheduleFullUpdate(); + part.TriggerScriptChangedEvent(Changed.MEDIA); + return string.Empty; } @@ -277,6 +280,8 @@ namespace OpenSim.Region.CoreModules.Media.Moap part.ScheduleFullUpdate(); + part.TriggerScriptChangedEvent(Changed.MEDIA); + return string.Empty; } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index e6a1696..444a239 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -58,7 +58,8 @@ namespace OpenSim.Region.Framework.Scenes OWNER = 128, REGION_RESTART = 256, REGION = 512, - TELEPORT = 1024 + TELEPORT = 1024, + MEDIA = 2048 } // I don't really know where to put this except here. diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 6ef786a..06f9426 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -276,6 +276,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int CHANGED_REGION_RESTART = 256; public const int CHANGED_REGION = 512; public const int CHANGED_TELEPORT = 1024; + public const int CHANGED_MEDIA = 2048; public const int CHANGED_ANIMATION = 16384; public const int TYPE_INVALID = 0; public const int TYPE_INTEGER = 1; -- cgit v1.1