Fire CHANGED_MEDIA event if a media texture is set or cleared

prebuild-update
Justin Clark-Casey (justincc) 2010-07-12 22:27:11 +01:00
parent 4b0c5711b5
commit 55caab1efd
3 changed files with 8 additions and 1 deletions

View File

@ -127,6 +127,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
part.Shape.Media[face] = me; part.Shape.Media[face] = me;
UpdateMediaUrl(part); UpdateMediaUrl(part);
part.ScheduleFullUpdate(); part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA);
} }
public void ClearMediaEntry(SceneObjectPart part, int face) 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. // Arguably, we could avoid sending a full update to the avatar that just changed the texture.
part.ScheduleFullUpdate(); part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA);
return string.Empty; return string.Empty;
} }
@ -277,6 +280,8 @@ namespace OpenSim.Region.CoreModules.Media.Moap
part.ScheduleFullUpdate(); part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA);
return string.Empty; return string.Empty;
} }

View File

@ -58,7 +58,8 @@ namespace OpenSim.Region.Framework.Scenes
OWNER = 128, OWNER = 128,
REGION_RESTART = 256, REGION_RESTART = 256,
REGION = 512, REGION = 512,
TELEPORT = 1024 TELEPORT = 1024,
MEDIA = 2048
} }
// I don't really know where to put this except here. // I don't really know where to put this except here.

View File

@ -276,6 +276,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int CHANGED_REGION_RESTART = 256; public const int CHANGED_REGION_RESTART = 256;
public const int CHANGED_REGION = 512; public const int CHANGED_REGION = 512;
public const int CHANGED_TELEPORT = 1024; public const int CHANGED_TELEPORT = 1024;
public const int CHANGED_MEDIA = 2048;
public const int CHANGED_ANIMATION = 16384; public const int CHANGED_ANIMATION = 16384;
public const int TYPE_INVALID = 0; public const int TYPE_INVALID = 0;
public const int TYPE_INTEGER = 1; public const int TYPE_INTEGER = 1;