Fix bug where llSetPrimMediaParams() reported success but never set the media texture.

We weren't setting the TextureEntryFace.MediaFlags = true when a media texture was set directly via a script.  This was being done when the viewer was setting them directly.
0.7.1-dev
Justin Clark-Casey (justincc) 2011-03-05 00:06:51 +00:00
parent b82b0b1677
commit 3c89527b22
1 changed files with 14 additions and 3 deletions

View File

@ -227,6 +227,8 @@ namespace OpenSim.Region.CoreModules.Media.Moap
public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me)
{ {
// m_log.DebugFormat("[MOAP]: SetMediaEntry for {0}, face {1}", part.Name, face);
CheckFaceParam(part, face); CheckFaceParam(part, face);
if (null == part.Shape.Media) if (null == part.Shape.Media)
@ -236,6 +238,13 @@ namespace OpenSim.Region.CoreModules.Media.Moap
part.Shape.Media[face] = me; part.Shape.Media[face] = me;
UpdateMediaUrl(part, UUID.Zero); UpdateMediaUrl(part, UUID.Zero);
// Temporary code to fix llSetPrimMediaParams() bug, pending refactoring
Primitive.TextureEntry te = part.Shape.Textures;
Primitive.TextureEntryFace teFace = te.CreateFace((uint)face);
teFace.MediaFlags = true;
part.Shape.Textures = te;
part.ScheduleFullUpdate(); part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA); part.TriggerScriptChangedEvent(Changed.MEDIA);
} }
@ -333,7 +342,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
} }
// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId);
//
// for (int i = 0; i < omu.FaceMedia.Length; i++) // for (int i = 0; i < omu.FaceMedia.Length; i++)
// { // {
// MediaEntry me = omu.FaceMedia[i]; // MediaEntry me = omu.FaceMedia[i];
@ -380,6 +389,8 @@ namespace OpenSim.Region.CoreModules.Media.Moap
} }
else else
{ {
// m_log.DebugFormat("[MOAP]: Setting existing media list for {0}", part.Name);
// We need to go through the media textures one at a time to make sure that we have permission // We need to go through the media textures one at a time to make sure that we have permission
// to change them // to change them