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
parent
b82b0b1677
commit
3c89527b22
|
@ -227,6 +227,8 @@ namespace OpenSim.Region.CoreModules.Media.Moap
|
|||
|
||||
public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me)
|
||||
{
|
||||
// m_log.DebugFormat("[MOAP]: SetMediaEntry for {0}, face {1}", part.Name, face);
|
||||
|
||||
CheckFaceParam(part, face);
|
||||
|
||||
if (null == part.Shape.Media)
|
||||
|
@ -236,6 +238,13 @@ namespace OpenSim.Region.CoreModules.Media.Moap
|
|||
part.Shape.Media[face] = me;
|
||||
|
||||
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.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);
|
||||
|
||||
//
|
||||
// for (int i = 0; i < omu.FaceMedia.Length; i++)
|
||||
// {
|
||||
// MediaEntry me = omu.FaceMedia[i];
|
||||
|
@ -380,6 +389,8 @@ namespace OpenSim.Region.CoreModules.Media.Moap
|
|||
}
|
||||
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
|
||||
// to change them
|
||||
|
||||
|
|
Loading…
Reference in New Issue