aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorSignpostMarv2012-10-16 12:40:21 +0100
committerJustin Clark-Casey (justincc)2012-10-29 23:39:00 +0000
commitc5af16aef82e2bdf2f4d877a231180e00a8893a6 (patch)
tree3be95d8dea8bfcc764eb0cd374ecd88aed2a7ea6 /OpenSim/Region/CoreModules
parentmoving SendSound from SceneObjectPart to ISoundModule (diff)
downloadopensim-SC_OLD-c5af16aef82e2bdf2f4d877a231180e00a8893a6.zip
opensim-SC_OLD-c5af16aef82e2bdf2f4d877a231180e00a8893a6.tar.gz
opensim-SC_OLD-c5af16aef82e2bdf2f4d877a231180e00a8893a6.tar.bz2
opensim-SC_OLD-c5af16aef82e2bdf2f4d877a231180e00a8893a6.tar.xz
shuffling code around so that the interface for ISoundModule.SendSound() specifies a UUID rather than a string
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs25
1 files changed, 4 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
index 37863ee..417c071 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
@@ -278,10 +278,13 @@ namespace OpenSim.Region.CoreModules.World.Sound
278 m_host.SendFullUpdateToAllClients(); 278 m_host.SendFullUpdateToAllClients();
279 } 279 }
280 280
281 public void SendSound(UUID objectID, string sound, double volume, 281 public void SendSound(UUID objectID, UUID soundID, double volume,
282 bool triggered, byte flags, float radius, bool useMaster, 282 bool triggered, byte flags, float radius, bool useMaster,
283 bool isMaster) 283 bool isMaster)
284 { 284 {
285 if (soundID == UUID.Zero)
286 return;
287
285 SceneObjectPart part; 288 SceneObjectPart part;
286 if (!m_scene.TryGetSceneObjectPart(objectID, out part)) 289 if (!m_scene.TryGetSceneObjectPart(objectID, out part))
287 return; 290 return;
@@ -290,29 +293,9 @@ namespace OpenSim.Region.CoreModules.World.Sound
290 293
291 UUID parentID = part.ParentGroup.UUID; 294 UUID parentID = part.ParentGroup.UUID;
292 295
293 UUID soundID = UUID.Zero;
294 Vector3 position = part.AbsolutePosition; // region local 296 Vector3 position = part.AbsolutePosition; // region local
295 ulong regionHandle = m_scene.RegionInfo.RegionHandle; 297 ulong regionHandle = m_scene.RegionInfo.RegionHandle;
296 298
297 if (!UUID.TryParse(sound, out soundID))
298 {
299 // search sound file from inventory
300 lock (part.TaskInventory)
301 {
302 foreach (KeyValuePair<UUID, TaskInventoryItem> item in part.TaskInventory)
303 {
304 if (item.Value.Type == (int)AssetType.Sound && item.Value.Name == sound)
305 {
306 soundID = item.Value.ItemID;
307 break;
308 }
309 }
310 }
311 }
312
313 if (soundID == UUID.Zero)
314 return;
315
316 if (useMaster) 299 if (useMaster)
317 { 300 {
318 if (isMaster) 301 if (isMaster)