swapping GetSceneObjectPart for TryGetSceneObjectPart in PlayAttachedSound to imply why we're doing an early return.

integration
SignpostMarv 2012-10-05 14:30:51 +01:00 committed by Justin Clark-Casey (justincc)
parent 1d47bcb6b6
commit 516ee244b4
1 changed files with 4 additions and 4 deletions

View File

@ -106,8 +106,8 @@ namespace OpenSim.Region.CoreModules.World.Sound
public virtual void PlayAttachedSound(
UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags, float radius)
{
SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
if (part == null)
SceneObjectPart part;
if (!m_scene.TryGetSceneObjectPart(objectID, out part))
return;
SceneObjectGroup grp = part.ParentGroup;
@ -141,8 +141,8 @@ namespace OpenSim.Region.CoreModules.World.Sound
public virtual void TriggerSound(
UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle, float radius)
{
SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
if (part == null)
SceneObjectPart part;
if (!m_scene.TryGetSceneObjectPart(objectID, out part))
{
ScenePresence sp;
if (!m_scene.TryGetScenePresence(objectID, out sp))