diff options
author | Dan Lake | 2010-03-19 05:58:34 -0700 |
---|---|---|
committer | John Hurliman | 2010-03-19 15:16:44 -0700 |
commit | 62e0b53ca4697a852ee1e36e86da6a32e93bd55e (patch) | |
tree | aacaa4c84a0b7e61784909ca76fb1528ca06938b | |
parent | Cleaned up access to scenepresences in scenegraph. GetScenePresences and GetA... (diff) | |
download | opensim-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.
22 files changed, 41 insertions, 41 deletions
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index 86d63f8..19ab409 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs | |||
@@ -91,7 +91,7 @@ namespace OpenSim.Framework | |||
91 | /// </exception> | 91 | /// </exception> |
92 | bool PresenceChildStatus(UUID agentId); | 92 | bool PresenceChildStatus(UUID agentId); |
93 | 93 | ||
94 | bool TryGetAvatar(UUID agentID, out object scenePresence); | 94 | bool TryGetScenePresence(UUID agentID, out object scenePresence); |
95 | 95 | ||
96 | T RequestModuleInterface<T>(); | 96 | T RequestModuleInterface<T>(); |
97 | T[] RequestModuleInterfaces<T>(); | 97 | T[] RequestModuleInterfaces<T>(); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a9b5c2b..18d3889 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -5978,7 +5978,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5978 | || avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y == 255.5f) | 5978 | || avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y == 255.5f) |
5979 | { | 5979 | { |
5980 | ScenePresence avatar = null; | 5980 | ScenePresence avatar = null; |
5981 | if (((Scene)m_scene).TryGetAvatar(AgentId, out avatar)) | 5981 | if (((Scene)m_scene).TryGetScenePresence(AgentId, out avatar)) |
5982 | { | 5982 | { |
5983 | if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.X == 255.5f) | 5983 | if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.X == 255.5f) |
5984 | { | 5984 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index f54e41a..23828ef 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
86 | 86 | ||
87 | // Save avatar attachment information | 87 | // Save avatar attachment information |
88 | ScenePresence presence; | 88 | ScenePresence presence; |
89 | if (m_scene.AvatarFactory != null && m_scene.TryGetAvatar(remoteClient.AgentId, out presence)) | 89 | if (m_scene.AvatarFactory != null && m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) |
90 | { | 90 | { |
91 | m_log.Info( | 91 | m_log.Info( |
92 | "[ATTACHMENTS MODULE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId | 92 | "[ATTACHMENTS MODULE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId |
@@ -255,7 +255,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
255 | AttachmentPt = att.RootPart.AttachmentPoint; | 255 | AttachmentPt = att.RootPart.AttachmentPoint; |
256 | 256 | ||
257 | ScenePresence presence; | 257 | ScenePresence presence; |
258 | if (m_scene.TryGetAvatar(remoteClient.AgentId, out presence)) | 258 | if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) |
259 | { | 259 | { |
260 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 260 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
261 | item = m_scene.InventoryService.GetItem(item); | 261 | item = m_scene.InventoryService.GetItem(item); |
@@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
299 | } | 299 | } |
300 | 300 | ||
301 | ScenePresence presence; | 301 | ScenePresence presence; |
302 | if (m_scene.TryGetAvatar(remoteClient.AgentId, out presence)) | 302 | if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) |
303 | { | 303 | { |
304 | // XXYY!! | 304 | // XXYY!! |
305 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 305 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
@@ -314,7 +314,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
314 | public void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient) | 314 | public void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient) |
315 | { | 315 | { |
316 | ScenePresence presence; | 316 | ScenePresence presence; |
317 | if (m_scene.TryGetAvatar(remoteClient.AgentId, out presence)) | 317 | if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) |
318 | { | 318 | { |
319 | presence.Appearance.DetachAttachment(itemID); | 319 | presence.Appearance.DetachAttachment(itemID); |
320 | 320 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 4f03b0e..be89740 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -358,7 +358,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
358 | { | 358 | { |
359 | ScenePresence presence; | 359 | ScenePresence presence; |
360 | 360 | ||
361 | if (s.TryGetAvatar(agentID, out presence)) | 361 | if (s.TryGetScenePresence(agentID, out presence)) |
362 | { | 362 | { |
363 | // If the agent is in this scene, then we | 363 | // If the agent is in this scene, then we |
364 | // are being called twice in a single | 364 | // are being called twice in a single |
diff --git a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs index 63a93aa..c011776 100644 --- a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs | |||
@@ -82,7 +82,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps | |||
82 | responsedata["str_response_string"] = "Request wasn't what was expected"; | 82 | responsedata["str_response_string"] = "Request wasn't what was expected"; |
83 | ScenePresence avatar; | 83 | ScenePresence avatar; |
84 | 84 | ||
85 | if (!m_scene.TryGetAvatar(AgentId, out avatar)) | 85 | if (!m_scene.TryGetScenePresence(AgentId, out avatar)) |
86 | return responsedata; | 86 | return responsedata; |
87 | 87 | ||
88 | 88 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 25f5154..93aeb94 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -190,7 +190,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
190 | if (account == null) // foreign | 190 | if (account == null) // foreign |
191 | { | 191 | { |
192 | ScenePresence sp = null; | 192 | ScenePresence sp = null; |
193 | if (m_Scene.TryGetAvatar(userID, out sp)) | 193 | if (m_Scene.TryGetScenePresence(userID, out sp)) |
194 | { | 194 | { |
195 | AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); | 195 | AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); |
196 | if (aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) | 196 | if (aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) |
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs index 8cf4619..e95d2f8 100644 --- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -1206,7 +1206,7 @@ namespace OpenSim.Region.CoreModules.InterGrid | |||
1206 | { | 1206 | { |
1207 | Scene homeScene = GetRootScene(); | 1207 | Scene homeScene = GetRootScene(); |
1208 | ScenePresence avatar = null; | 1208 | ScenePresence avatar = null; |
1209 | if (homeScene.TryGetAvatar(avatarId,out avatar)) | 1209 | if (homeScene.TryGetScenePresence(avatarId,out avatar)) |
1210 | { | 1210 | { |
1211 | KillAUser ku = new KillAUser(avatar,mod); | 1211 | KillAUser ku = new KillAUser(avatar,mod); |
1212 | Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true); | 1212 | Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index c6312e0..54508cc 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -502,7 +502,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
502 | private UUID GetSessionID(UUID userID) | 502 | private UUID GetSessionID(UUID userID) |
503 | { | 503 | { |
504 | ScenePresence sp = null; | 504 | ScenePresence sp = null; |
505 | if (m_Scene.TryGetAvatar(userID, out sp)) | 505 | if (m_Scene.TryGetScenePresence(userID, out sp)) |
506 | { | 506 | { |
507 | return sp.ControllingClient.SessionId; | 507 | return sp.ControllingClient.SessionId; |
508 | } | 508 | } |
@@ -521,7 +521,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
521 | if (account == null) // foreign user | 521 | if (account == null) // foreign user |
522 | { | 522 | { |
523 | ScenePresence sp = null; | 523 | ScenePresence sp = null; |
524 | m_Scene.TryGetAvatar(userID, out sp); | 524 | m_Scene.TryGetScenePresence(userID, out sp); |
525 | if (sp != null) | 525 | if (sp != null) |
526 | { | 526 | { |
527 | AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); | 527 | AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs index 3c3534f..5e06580 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs | |||
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
100 | ScenePresence sp = null; | 100 | ScenePresence sp = null; |
101 | foreach (Scene s in m_Scenes) | 101 | foreach (Scene s in m_Scenes) |
102 | { | 102 | { |
103 | s.TryGetAvatar(clientID, out sp); | 103 | s.TryGetScenePresence(clientID, out sp); |
104 | if ((sp != null) && !sp.IsChildAgent && (s != scene)) | 104 | if ((sp != null) && !sp.IsChildAgent && (s != scene)) |
105 | { | 105 | { |
106 | m_log.DebugFormat("[INVENTORY CACHE]: OnClientClosed in {0}, but user {1} still in sim. Keeping system folders in cache", | 106 | m_log.DebugFormat("[INVENTORY CACHE]: OnClientClosed in {0}, but user {1} still in sim. Keeping system folders in cache", |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index e98df28..7a75a89 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | |||
@@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
88 | Vector3 position = new Vector3(128, 128, 0); | 88 | Vector3 position = new Vector3(128, 128, 0); |
89 | Vector3 lookat = new Vector3(0, 1, 0); | 89 | Vector3 lookat = new Vector3(0, 1, 0); |
90 | 90 | ||
91 | if (client.Scene.TryGetAvatar(client.AgentId, out sp)) | 91 | if (client.Scene.TryGetScenePresence(client.AgentId, out sp)) |
92 | { | 92 | { |
93 | if (sp is ScenePresence) | 93 | if (sp is ScenePresence) |
94 | { | 94 | { |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index f1cc0dd..2b0e83f 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
210 | // this is here because CAPS map requests work even beyond the 10,000 limit. | 210 | // this is here because CAPS map requests work even beyond the 10,000 limit. |
211 | ScenePresence avatarPresence = null; | 211 | ScenePresence avatarPresence = null; |
212 | 212 | ||
213 | m_scene.TryGetAvatar(agentID, out avatarPresence); | 213 | m_scene.TryGetScenePresence(agentID, out avatarPresence); |
214 | 214 | ||
215 | if (avatarPresence != null) | 215 | if (avatarPresence != null) |
216 | { | 216 | { |
@@ -489,7 +489,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
489 | if (mrs.agentID != UUID.Zero) | 489 | if (mrs.agentID != UUID.Zero) |
490 | { | 490 | { |
491 | ScenePresence av = null; | 491 | ScenePresence av = null; |
492 | m_scene.TryGetAvatar(mrs.agentID, out av); | 492 | m_scene.TryGetScenePresence(mrs.agentID, out av); |
493 | if (av != null) | 493 | if (av != null) |
494 | { | 494 | { |
495 | if (response.ContainsKey(mrs.itemtype.ToString())) | 495 | if (response.ContainsKey(mrs.itemtype.ToString())) |
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 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs index b85bac6..2fcc477 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs | |||
@@ -520,7 +520,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
520 | // protected void AnnounceToAgentsRegion(Scene scene, string msg) | 520 | // protected void AnnounceToAgentsRegion(Scene scene, string msg) |
521 | // { | 521 | // { |
522 | // ScenePresence agent = null; | 522 | // ScenePresence agent = null; |
523 | // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetAvatar(client.AgentId, out agent)) | 523 | // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetScenePresence(client.AgentId, out agent)) |
524 | // AnnounceToAgentsRegion(agent, msg); | 524 | // AnnounceToAgentsRegion(agent, msg); |
525 | // else | 525 | // else |
526 | // m_log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name); | 526 | // m_log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name); |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 6e742f1..ab0be77 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -110,7 +110,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
110 | if (m_avatars.ContainsKey(agentID)) | 110 | if (m_avatars.ContainsKey(agentID)) |
111 | { | 111 | { |
112 | ScenePresence sp; | 112 | ScenePresence sp; |
113 | scene.TryGetAvatar(agentID, out sp); | 113 | scene.TryGetScenePresence(agentID, out sp); |
114 | sp.DoAutoPilot(0, pos, m_avatars[agentID]); | 114 | sp.DoAutoPilot(0, pos, m_avatars[agentID]); |
115 | } | 115 | } |
116 | } | 116 | } |
@@ -165,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
165 | p_scene.AddNewClient(npcAvatar); | 165 | p_scene.AddNewClient(npcAvatar); |
166 | 166 | ||
167 | ScenePresence sp; | 167 | ScenePresence sp; |
168 | if (p_scene.TryGetAvatar(npcAvatar.AgentId, out sp)) | 168 | if (p_scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) |
169 | { | 169 | { |
170 | AvatarAppearance x = GetAppearance(p_cloneAppearanceFrom, p_scene); | 170 | AvatarAppearance x = GetAppearance(p_cloneAppearanceFrom, p_scene); |
171 | 171 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 6cbf260..2296379 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -472,7 +472,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
472 | { | 472 | { |
473 | ScenePresence sp; | 473 | ScenePresence sp; |
474 | // Try direct lookup by UUID | 474 | // Try direct lookup by UUID |
475 | if(!m_CmdManager.m_ScriptEngine.World.TryGetAvatar(ts.keyID, out sp)) | 475 | if(!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out sp)) |
476 | return sensedEntities; | 476 | return sensedEntities; |
477 | senseEntity(sp); | 477 | senseEntity(sp); |
478 | } | 478 | } |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 5e0f7c2..f47bfbb 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -301,7 +301,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
301 | private void SignificantClientMovementHandler(IClientAPI client) | 301 | private void SignificantClientMovementHandler(IClientAPI client) |
302 | { | 302 | { |
303 | ScenePresence sp; | 303 | ScenePresence sp; |
304 | if (client.Scene is Scene && ((Scene)client.Scene).TryGetAvatar(client.AgentId, out sp)) | 304 | if (client.Scene is Scene && ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out sp)) |
305 | ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | 305 | ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); |
306 | } | 306 | } |
307 | 307 | ||
@@ -312,7 +312,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
312 | client.OnConnectionClosed -= LogoutHandler; | 312 | client.OnConnectionClosed -= LogoutHandler; |
313 | 313 | ||
314 | object obj; | 314 | object obj; |
315 | if (client.Scene.TryGetAvatar(client.AgentId, out obj) && obj is ScenePresence) | 315 | if (client.Scene.TryGetScenePresence(client.AgentId, out obj) && obj is ScenePresence) |
316 | { | 316 | { |
317 | // The avatar is still in the scene, we can get the exact logout position | 317 | // The avatar is still in the scene, we can get the exact logout position |
318 | ScenePresence sp = (ScenePresence)obj; | 318 | ScenePresence sp = (ScenePresence)obj; |