aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorDan Lake2010-03-19 05:58:34 -0700
committerJohn Hurliman2010-03-19 15:16:44 -0700
commit62e0b53ca4697a852ee1e36e86da6a32e93bd55e (patch)
treeaacaa4c84a0b7e61784909ca76fb1528ca06938b /OpenSim/Region/Framework
parentCleaned up access to scenepresences in scenegraph. GetScenePresences and GetA... (diff)
downloadopensim-SC_OLD-62e0b53ca4697a852ee1e36e86da6a32e93bd55e.zip
opensim-SC_OLD-62e0b53ca4697a852ee1e36e86da6a32e93bd55e.tar.gz
opensim-SC_OLD-62e0b53ca4697a852ee1e36e86da6a32e93bd55e.tar.bz2
opensim-SC_OLD-62e0b53ca4697a852ee1e36e86da6a32e93bd55e.tar.xz
Renamed TryGetAvatar to TryGetScenePresence on SceneManager, SceneBase, Scene and SceneGraph. This was the only change in this patch to keep it isolated from other recent changes to the same set of files.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs2
7 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 41533a1..32311d8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -132,7 +132,7 @@ namespace OpenSim.Region.Framework.Scenes
132 { 132 {
133 ScenePresence avatar; 133 ScenePresence avatar;
134 134
135 if (TryGetAvatar(avatarId, out avatar)) 135 if (TryGetScenePresence(avatarId, out avatar))
136 { 136 {
137 IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); 137 IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>();
138 if (invAccess != null) 138 if (invAccess != null)
@@ -230,7 +230,7 @@ namespace OpenSim.Region.Framework.Scenes
230 { 230 {
231 ScenePresence avatar; 231 ScenePresence avatar;
232 232
233 if (TryGetAvatar(avatarId, out avatar)) 233 if (TryGetScenePresence(avatarId, out avatar))
234 { 234 {
235 return CapsUpdateTaskInventoryScriptAsset( 235 return CapsUpdateTaskInventoryScriptAsset(
236 avatar.ControllingClient, itemId, primId, isScriptRunning, data); 236 avatar.ControllingClient, itemId, primId, isScriptRunning, data);
@@ -683,7 +683,7 @@ namespace OpenSim.Region.Framework.Scenes
683 if (transactionID == UUID.Zero) 683 if (transactionID == UUID.Zero)
684 { 684 {
685 ScenePresence presence; 685 ScenePresence presence;
686 if (TryGetAvatar(remoteClient.AgentId, out presence)) 686 if (TryGetScenePresence(remoteClient.AgentId, out presence))
687 { 687 {
688 byte[] data = null; 688 byte[] data = null;
689 689
@@ -941,7 +941,7 @@ namespace OpenSim.Region.Framework.Scenes
941 { 941 {
942 ScenePresence avatar; 942 ScenePresence avatar;
943 943
944 if (TryGetAvatar(avatarId, out avatar)) 944 if (TryGetScenePresence(avatarId, out avatar))
945 { 945 {
946 return MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId); 946 return MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId);
947 } 947 }
@@ -1055,7 +1055,7 @@ namespace OpenSim.Region.Framework.Scenes
1055 1055
1056 ScenePresence avatar; 1056 ScenePresence avatar;
1057 1057
1058 if (TryGetAvatar(srcTaskItem.OwnerID, out avatar)) 1058 if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar))
1059 { 1059 {
1060 destPart.GetProperties(avatar.ControllingClient); 1060 destPart.GetProperties(avatar.ControllingClient);
1061 } 1061 }
@@ -1083,7 +1083,7 @@ namespace OpenSim.Region.Framework.Scenes
1083 } 1083 }
1084 1084
1085 ScenePresence avatar = null; 1085 ScenePresence avatar = null;
1086 if (TryGetAvatar(destID, out avatar)) 1086 if (TryGetScenePresence(destID, out avatar))
1087 { 1087 {
1088 //profile.SendInventoryDecendents(avatar.ControllingClient, 1088 //profile.SendInventoryDecendents(avatar.ControllingClient,
1089 // profile.RootFolder.ID, true, false); 1089 // profile.RootFolder.ID, true, false);
@@ -1420,7 +1420,7 @@ namespace OpenSim.Region.Framework.Scenes
1420 1420
1421 ScenePresence avatar; 1421 ScenePresence avatar;
1422 1422
1423 if (TryGetAvatar(srcTaskItem.OwnerID, out avatar)) 1423 if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar))
1424 { 1424 {
1425 destPart.GetProperties(avatar.ControllingClient); 1425 destPart.GetProperties(avatar.ControllingClient);
1426 } 1426 }
@@ -1860,7 +1860,7 @@ namespace OpenSim.Region.Framework.Scenes
1860 UUID inventoryID = part.ParentGroup.GetFromItemID(); 1860 UUID inventoryID = part.ParentGroup.GetFromItemID();
1861 1861
1862 ScenePresence presence; 1862 ScenePresence presence;
1863 if (TryGetAvatar(remoteClient.AgentId, out presence)) 1863 if (TryGetScenePresence(remoteClient.AgentId, out presence))
1864 { 1864 {
1865 if (!Permissions.CanRezObject(part.ParentGroup.Children.Count, remoteClient.AgentId, presence.AbsolutePosition)) 1865 if (!Permissions.CanRezObject(part.ParentGroup.Children.Count, remoteClient.AgentId, presence.AbsolutePosition))
1866 return; 1866 return;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 4b97e39..2080687 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4254,9 +4254,9 @@ namespace OpenSim.Region.Framework.Scenes
4254 return m_sceneGraph.GetGroupByPrim(localID); 4254 return m_sceneGraph.GetGroupByPrim(localID);
4255 } 4255 }
4256 4256
4257 public override bool TryGetAvatar(UUID avatarId, out ScenePresence avatar) 4257 public override bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar)
4258 { 4258 {
4259 return m_sceneGraph.TryGetAvatar(avatarId, out avatar); 4259 return m_sceneGraph.TryGetScenePresence(avatarId, out avatar);
4260 } 4260 }
4261 4261
4262 public bool TryGetAvatarByName(string avatarName, out ScenePresence avatar) 4262 public bool TryGetAvatarByName(string avatarName, out ScenePresence avatar)
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index 74476ed..3218dad 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -190,11 +190,11 @@ namespace OpenSim.Region.Framework.Scenes
190 /// <param name="agentID"></param> 190 /// <param name="agentID"></param>
191 public abstract void RemoveClient(UUID agentID); 191 public abstract void RemoveClient(UUID agentID);
192 192
193 public bool TryGetAvatar(UUID agentID, out object scenePresence) 193 public bool TryGetScenePresence(UUID agentID, out object scenePresence)
194 { 194 {
195 scenePresence = null; 195 scenePresence = null;
196 ScenePresence sp = null; 196 ScenePresence sp = null;
197 if (TryGetAvatar(agentID, out sp)) 197 if (TryGetScenePresence(agentID, out sp))
198 { 198 {
199 scenePresence = sp; 199 scenePresence = sp;
200 return true; 200 return true;
@@ -203,7 +203,7 @@ namespace OpenSim.Region.Framework.Scenes
203 return false; 203 return false;
204 } 204 }
205 205
206 public abstract bool TryGetAvatar(UUID agentID, out ScenePresence scenePresence); 206 public abstract bool TryGetScenePresence(UUID agentID, out ScenePresence scenePresence);
207 207
208 #endregion 208 #endregion
209 209
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index b6e5995..23a4ee9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -756,7 +756,7 @@ namespace OpenSim.Region.Framework.Scenes
756 return null; 756 return null;
757 } 757 }
758 758
759 protected internal bool TryGetAvatar(UUID agentID, out ScenePresence avatar) 759 protected internal bool TryGetScenePresence(UUID agentID, out ScenePresence avatar)
760 { 760 {
761 lock (m_scenePresences) 761 lock (m_scenePresences)
762 { 762 {
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index 1168341..3b84734 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -486,11 +486,11 @@ namespace OpenSim.Region.Framework.Scenes
486 ForEachCurrentScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); }); 486 ForEachCurrentScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); });
487 } 487 }
488 488
489 public bool TryGetAvatar(UUID avatarId, out ScenePresence avatar) 489 public bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar)
490 { 490 {
491 foreach (Scene scene in m_localScenes) 491 foreach (Scene scene in m_localScenes)
492 { 492 {
493 if (scene.TryGetAvatar(avatarId, out avatar)) 493 if (scene.TryGetScenePresence(avatarId, out avatar))
494 { 494 {
495 return true; 495 return true;
496 } 496 }
@@ -505,7 +505,7 @@ namespace OpenSim.Region.Framework.Scenes
505 ScenePresence avatar = null; 505 ScenePresence avatar = null;
506 foreach (Scene mScene in m_localScenes) 506 foreach (Scene mScene in m_localScenes)
507 { 507 {
508 if (mScene.TryGetAvatar(avatarId, out avatar)) 508 if (mScene.TryGetScenePresence(avatarId, out avatar))
509 { 509 {
510 scene = mScene; 510 scene = mScene;
511 return true; 511 return true;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 88bdf31..46eadee 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -680,7 +680,7 @@ namespace OpenSim.Region.Framework.Scenes
680 if (m_parentGroup != null) // TODO can there be a SOP without a SOG? 680 if (m_parentGroup != null) // TODO can there be a SOP without a SOG?
681 { 681 {
682 ScenePresence avatar; 682 ScenePresence avatar;
683 if (m_parentGroup.Scene.TryGetAvatar(m_sitTargetAvatar, out avatar)) 683 if (m_parentGroup.Scene.TryGetScenePresence(m_sitTargetAvatar, out avatar))
684 { 684 {
685 avatar.ParentPosition = GetWorldPosition(); 685 avatar.ParentPosition = GetWorldPosition();
686 } 686 }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs
index 840039c..dd9f8f6 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
66 throw new NotImplementedException(); 66 throw new NotImplementedException();
67 } 67 }
68 68
69 public override bool TryGetAvatar(UUID agentID, out ScenePresence scenePresence) 69 public override bool TryGetScenePresence(UUID agentID, out ScenePresence scenePresence)
70 { 70 {
71 throw new NotImplementedException(); 71 throw new NotImplementedException();
72 } 72 }