diff options
author | SignpostMarv | 2012-10-05 14:30:51 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-29 23:38:57 +0000 |
commit | 516ee244b4f8f493b9b76a62b62f4e8304826e4f (patch) | |
tree | 47492909957acf82711627af1c4041bbb6101f7f | |
parent | stripping whitespace from ISoundModule, formatting SoundModuleNonShared.cs (diff) | |
download | opensim-SC_OLD-516ee244b4f8f493b9b76a62b62f4e8304826e4f.zip opensim-SC_OLD-516ee244b4f8f493b9b76a62b62f4e8304826e4f.tar.gz opensim-SC_OLD-516ee244b4f8f493b9b76a62b62f4e8304826e4f.tar.bz2 opensim-SC_OLD-516ee244b4f8f493b9b76a62b62f4e8304826e4f.tar.xz |
swapping GetSceneObjectPart for TryGetSceneObjectPart in PlayAttachedSound to imply why we're doing an early return.
-rw-r--r-- | OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs index 74f2874..917b3dc 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs | |||
@@ -106,8 +106,8 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
106 | public virtual void PlayAttachedSound( | 106 | public virtual void PlayAttachedSound( |
107 | UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags, float radius) | 107 | UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags, float radius) |
108 | { | 108 | { |
109 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); | 109 | SceneObjectPart part; |
110 | if (part == null) | 110 | if (!m_scene.TryGetSceneObjectPart(objectID, out part)) |
111 | return; | 111 | return; |
112 | 112 | ||
113 | SceneObjectGroup grp = part.ParentGroup; | 113 | SceneObjectGroup grp = part.ParentGroup; |
@@ -141,8 +141,8 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
141 | public virtual void TriggerSound( | 141 | public virtual void TriggerSound( |
142 | UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle, float radius) | 142 | UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle, float radius) |
143 | { | 143 | { |
144 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); | 144 | SceneObjectPart part; |
145 | if (part == null) | 145 | if (!m_scene.TryGetSceneObjectPart(objectID, out part)) |
146 | { | 146 | { |
147 | ScenePresence sp; | 147 | ScenePresence sp; |
148 | if (!m_scene.TryGetScenePresence(objectID, out sp)) | 148 | if (!m_scene.TryGetScenePresence(objectID, out sp)) |