diff options
author | Justin Clark-Casey (justincc) | 2011-03-05 00:06:51 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-03-05 00:06:51 +0000 |
commit | 3c89527b222c2ddc50553ce1c49f22e9f05db11b (patch) | |
tree | 55a07a7dcd08154b1edf950c166a9ae25e17bc07 /OpenSim | |
parent | Normalizing comparison to lower case, just in case ppl set their config vars ... (diff) | |
download | opensim-SC_OLD-3c89527b222c2ddc50553ce1c49f22e9f05db11b.zip opensim-SC_OLD-3c89527b222c2ddc50553ce1c49f22e9f05db11b.tar.gz opensim-SC_OLD-3c89527b222c2ddc50553ce1c49f22e9f05db11b.tar.bz2 opensim-SC_OLD-3c89527b222c2ddc50553ce1c49f22e9f05db11b.tar.xz |
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.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 7c5d044..9132753 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | |||
@@ -227,15 +227,24 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
227 | 227 | ||
228 | public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) | 228 | public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) |
229 | { | 229 | { |
230 | // m_log.DebugFormat("[MOAP]: SetMediaEntry for {0}, face {1}", part.Name, face); | ||
231 | |||
230 | CheckFaceParam(part, face); | 232 | CheckFaceParam(part, face); |
231 | 233 | ||
232 | if (null == part.Shape.Media) | 234 | if (null == part.Shape.Media) |
233 | part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); | 235 | part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); |
234 | 236 | ||
235 | lock (part.Shape.Media) | 237 | lock (part.Shape.Media) |
236 | part.Shape.Media[face] = me; | 238 | part.Shape.Media[face] = me; |
237 | 239 | ||
238 | UpdateMediaUrl(part, UUID.Zero); | 240 | UpdateMediaUrl(part, UUID.Zero); |
241 | |||
242 | // Temporary code to fix llSetPrimMediaParams() bug, pending refactoring | ||
243 | Primitive.TextureEntry te = part.Shape.Textures; | ||
244 | Primitive.TextureEntryFace teFace = te.CreateFace((uint)face); | ||
245 | teFace.MediaFlags = true; | ||
246 | part.Shape.Textures = te; | ||
247 | |||
239 | part.ScheduleFullUpdate(); | 248 | part.ScheduleFullUpdate(); |
240 | part.TriggerScriptChangedEvent(Changed.MEDIA); | 249 | part.TriggerScriptChangedEvent(Changed.MEDIA); |
241 | } | 250 | } |
@@ -333,7 +342,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
333 | } | 342 | } |
334 | 343 | ||
335 | // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); | 344 | // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); |
336 | 345 | // | |
337 | // for (int i = 0; i < omu.FaceMedia.Length; i++) | 346 | // for (int i = 0; i < omu.FaceMedia.Length; i++) |
338 | // { | 347 | // { |
339 | // MediaEntry me = omu.FaceMedia[i]; | 348 | // MediaEntry me = omu.FaceMedia[i]; |
@@ -380,6 +389,8 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
380 | } | 389 | } |
381 | else | 390 | else |
382 | { | 391 | { |
392 | // m_log.DebugFormat("[MOAP]: Setting existing media list for {0}", part.Name); | ||
393 | |||
383 | // We need to go through the media textures one at a time to make sure that we have permission | 394 | // We need to go through the media textures one at a time to make sure that we have permission |
384 | // to change them | 395 | // to change them |
385 | 396 | ||