aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneManager.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index 82458e2..0491205 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -545,6 +545,23 @@ namespace OpenSim.Region.Framework.Scenes
545 return false; 545 return false;
546 } 546 }
547 547
548 public bool TryGetRootScenePresence(UUID avatarId, out ScenePresence avatar)
549 {
550 lock (m_localScenes)
551 {
552 foreach (Scene scene in m_localScenes)
553 {
554 avatar = scene.GetScenePresence(avatarId);
555
556 if (avatar != null && !avatar.IsChildAgent)
557 return true;
558 }
559 }
560
561 avatar = null;
562 return false;
563 }
564
548 public bool TryGetAvatarsScene(UUID avatarId, out Scene scene) 565 public bool TryGetAvatarsScene(UUID avatarId, out Scene scene)
549 { 566 {
550 ScenePresence avatar = null; 567 ScenePresence avatar = null;
@@ -590,6 +607,22 @@ namespace OpenSim.Region.Framework.Scenes
590 return false; 607 return false;
591 } 608 }
592 609
610 public bool TryGetRootScenePresenceByName(string firstName, string lastName, out ScenePresence sp)
611 {
612 lock (m_localScenes)
613 {
614 foreach (Scene scene in m_localScenes)
615 {
616 sp = scene.GetScenePresence(firstName, lastName);
617 if (sp != null && !sp.IsChildAgent)
618 return true;
619 }
620 }
621
622 sp = null;
623 return false;
624 }
625
593 public void ForEachScene(Action<Scene> action) 626 public void ForEachScene(Action<Scene> action)
594 { 627 {
595 lock (m_localScenes) 628 lock (m_localScenes)