aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs33
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
2 files changed, 29 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index ef98599..0838387 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -618,6 +618,28 @@ namespace OpenSim.Region.Environment.Scenes
618 618
619 return result; 619 return result;
620 } 620 }
621
622 /// <summary>
623 /// Get the controlling client for the given avatar, if there is one.
624 ///
625 /// FIXME: The only user of the method right now is Caps.cs, in order to resolve a client API since it can't
626 /// use the ScenePresence. This could be better solved in a number of ways - we could establish an
627 /// OpenSim.Framework.IScenePresence, or move the caps code into a region package (which might be the more
628 /// suitable solution).
629 /// </summary>
630 /// <param name="agentId"></param>
631 /// <returns>null if either the avatar wasn't in the scene, or they do not have a controlling client</returns>
632 public IClientAPI GetControllingClient(LLUUID agentId)
633 {
634 ScenePresence presence = GetScenePresence(agentId);
635
636 if (presence != null)
637 {
638 return presence.ControllingClient;
639 }
640
641 return null;
642 }
621 643
622 /// <summary> 644 /// <summary>
623 /// Request a filtered list of m_scenePresences in this World 645 /// Request a filtered list of m_scenePresences in this World
@@ -640,16 +662,17 @@ namespace OpenSim.Region.Environment.Scenes
640 } 662 }
641 663
642 /// <summary> 664 /// <summary>
643 /// Request a Avatar by UUID 665 /// Request a scene presence by UUID
644 /// </summary> 666 /// </summary>
645 /// <param name="avatarID"></param> 667 /// <param name="avatarID"></param>
646 /// <returns></returns> 668 /// <returns>null if the agent was not found</returns>
647 public ScenePresence GetScenePresence(LLUUID avatarID) 669 public ScenePresence GetScenePresence(LLUUID agentID)
648 { 670 {
649 if (ScenePresences.ContainsKey(avatarID)) 671 if (ScenePresences.ContainsKey(agentID))
650 { 672 {
651 return ScenePresences[avatarID]; 673 return ScenePresences[agentID];
652 } 674 }
675
653 return null; 676 return null;
654 } 677 }
655 678
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 410120f..b93367c 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1884,7 +1884,7 @@ namespace OpenSim.Region.Environment.Scenes
1884 cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset; 1884 cap.ItemUpdatedCall = CapsUpdateInventoryItemAsset;
1885 cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset; 1885 cap.TaskScriptUpdatedCall = CapsUpdateTaskInventoryScriptAsset;
1886 cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; 1886 cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS;
1887 1887 cap.GetClient = m_innerScene.GetControllingClient;
1888 m_capsHandlers[agentId] = cap; 1888 m_capsHandlers[agentId] = cap;
1889 } 1889 }
1890 1890