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.
parent
859bc717a4
commit
62e0b53ca4
|
@ -91,7 +91,7 @@ namespace OpenSim.Framework
|
|||
/// </exception>
|
||||
bool PresenceChildStatus(UUID agentId);
|
||||
|
||||
bool TryGetAvatar(UUID agentID, out object scenePresence);
|
||||
bool TryGetScenePresence(UUID agentID, out object scenePresence);
|
||||
|
||||
T RequestModuleInterface<T>();
|
||||
T[] RequestModuleInterfaces<T>();
|
||||
|
|
|
@ -5978,7 +5978,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|| avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y == 255.5f)
|
||||
{
|
||||
ScenePresence avatar = null;
|
||||
if (((Scene)m_scene).TryGetAvatar(AgentId, out avatar))
|
||||
if (((Scene)m_scene).TryGetScenePresence(AgentId, out avatar))
|
||||
{
|
||||
if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.X == 255.5f)
|
||||
{
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
|
||||
// Save avatar attachment information
|
||||
ScenePresence presence;
|
||||
if (m_scene.AvatarFactory != null && m_scene.TryGetAvatar(remoteClient.AgentId, out presence))
|
||||
if (m_scene.AvatarFactory != null && m_scene.TryGetScenePresence(remoteClient.AgentId, out presence))
|
||||
{
|
||||
m_log.Info(
|
||||
"[ATTACHMENTS MODULE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId
|
||||
|
@ -255,7 +255,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
AttachmentPt = att.RootPart.AttachmentPoint;
|
||||
|
||||
ScenePresence presence;
|
||||
if (m_scene.TryGetAvatar(remoteClient.AgentId, out presence))
|
||||
if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence))
|
||||
{
|
||||
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
|
||||
item = m_scene.InventoryService.GetItem(item);
|
||||
|
@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
}
|
||||
|
||||
ScenePresence presence;
|
||||
if (m_scene.TryGetAvatar(remoteClient.AgentId, out presence))
|
||||
if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence))
|
||||
{
|
||||
// XXYY!!
|
||||
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
|
||||
|
@ -314,7 +314,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
public void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient)
|
||||
{
|
||||
ScenePresence presence;
|
||||
if (m_scene.TryGetAvatar(remoteClient.AgentId, out presence))
|
||||
if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence))
|
||||
{
|
||||
presence.Appearance.DetachAttachment(itemID);
|
||||
|
||||
|
|
|
@ -358,7 +358,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
|||
{
|
||||
ScenePresence presence;
|
||||
|
||||
if (s.TryGetAvatar(agentID, out presence))
|
||||
if (s.TryGetScenePresence(agentID, out presence))
|
||||
{
|
||||
// If the agent is in this scene, then we
|
||||
// are being called twice in a single
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
|||
responsedata["str_response_string"] = "Request wasn't what was expected";
|
||||
ScenePresence avatar;
|
||||
|
||||
if (!m_scene.TryGetAvatar(AgentId, out avatar))
|
||||
if (!m_scene.TryGetScenePresence(AgentId, out avatar))
|
||||
return responsedata;
|
||||
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
if (account == null) // foreign
|
||||
{
|
||||
ScenePresence sp = null;
|
||||
if (m_Scene.TryGetAvatar(userID, out sp))
|
||||
if (m_Scene.TryGetScenePresence(userID, out sp))
|
||||
{
|
||||
AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
|
||||
if (aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
|
||||
|
|
|
@ -1206,7 +1206,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
|||
{
|
||||
Scene homeScene = GetRootScene();
|
||||
ScenePresence avatar = null;
|
||||
if (homeScene.TryGetAvatar(avatarId,out avatar))
|
||||
if (homeScene.TryGetScenePresence(avatarId,out avatar))
|
||||
{
|
||||
KillAUser ku = new KillAUser(avatar,mod);
|
||||
Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true);
|
||||
|
|
|
@ -502,7 +502,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
private UUID GetSessionID(UUID userID)
|
||||
{
|
||||
ScenePresence sp = null;
|
||||
if (m_Scene.TryGetAvatar(userID, out sp))
|
||||
if (m_Scene.TryGetScenePresence(userID, out sp))
|
||||
{
|
||||
return sp.ControllingClient.SessionId;
|
||||
}
|
||||
|
@ -521,7 +521,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
if (account == null) // foreign user
|
||||
{
|
||||
ScenePresence sp = null;
|
||||
m_Scene.TryGetAvatar(userID, out sp);
|
||||
m_Scene.TryGetScenePresence(userID, out sp);
|
||||
if (sp != null)
|
||||
{
|
||||
AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
ScenePresence sp = null;
|
||||
foreach (Scene s in m_Scenes)
|
||||
{
|
||||
s.TryGetAvatar(clientID, out sp);
|
||||
s.TryGetScenePresence(clientID, out sp);
|
||||
if ((sp != null) && !sp.IsChildAgent && (s != scene))
|
||||
{
|
||||
m_log.DebugFormat("[INVENTORY CACHE]: OnClientClosed in {0}, but user {1} still in sim. Keeping system folders in cache",
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
|
|||
Vector3 position = new Vector3(128, 128, 0);
|
||||
Vector3 lookat = new Vector3(0, 1, 0);
|
||||
|
||||
if (client.Scene.TryGetAvatar(client.AgentId, out sp))
|
||||
if (client.Scene.TryGetScenePresence(client.AgentId, out sp))
|
||||
{
|
||||
if (sp is ScenePresence)
|
||||
{
|
||||
|
|
|
@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
// this is here because CAPS map requests work even beyond the 10,000 limit.
|
||||
ScenePresence avatarPresence = null;
|
||||
|
||||
m_scene.TryGetAvatar(agentID, out avatarPresence);
|
||||
m_scene.TryGetScenePresence(agentID, out avatarPresence);
|
||||
|
||||
if (avatarPresence != null)
|
||||
{
|
||||
|
@ -489,7 +489,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
if (mrs.agentID != UUID.Zero)
|
||||
{
|
||||
ScenePresence av = null;
|
||||
m_scene.TryGetAvatar(mrs.agentID, out av);
|
||||
m_scene.TryGetScenePresence(mrs.agentID, out av);
|
||||
if (av != null)
|
||||
{
|
||||
if (response.ContainsKey(mrs.itemtype.ToString()))
|
||||
|
|
|
@ -132,7 +132,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
ScenePresence avatar;
|
||||
|
||||
if (TryGetAvatar(avatarId, out avatar))
|
||||
if (TryGetScenePresence(avatarId, out avatar))
|
||||
{
|
||||
IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>();
|
||||
if (invAccess != null)
|
||||
|
@ -230,7 +230,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
ScenePresence avatar;
|
||||
|
||||
if (TryGetAvatar(avatarId, out avatar))
|
||||
if (TryGetScenePresence(avatarId, out avatar))
|
||||
{
|
||||
return CapsUpdateTaskInventoryScriptAsset(
|
||||
avatar.ControllingClient, itemId, primId, isScriptRunning, data);
|
||||
|
@ -683,7 +683,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (transactionID == UUID.Zero)
|
||||
{
|
||||
ScenePresence presence;
|
||||
if (TryGetAvatar(remoteClient.AgentId, out presence))
|
||||
if (TryGetScenePresence(remoteClient.AgentId, out presence))
|
||||
{
|
||||
byte[] data = null;
|
||||
|
||||
|
@ -941,7 +941,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
ScenePresence avatar;
|
||||
|
||||
if (TryGetAvatar(avatarId, out avatar))
|
||||
if (TryGetScenePresence(avatarId, out avatar))
|
||||
{
|
||||
return MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId);
|
||||
}
|
||||
|
@ -1055,7 +1055,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
ScenePresence avatar;
|
||||
|
||||
if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
|
||||
if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar))
|
||||
{
|
||||
destPart.GetProperties(avatar.ControllingClient);
|
||||
}
|
||||
|
@ -1083,7 +1083,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
ScenePresence avatar = null;
|
||||
if (TryGetAvatar(destID, out avatar))
|
||||
if (TryGetScenePresence(destID, out avatar))
|
||||
{
|
||||
//profile.SendInventoryDecendents(avatar.ControllingClient,
|
||||
// profile.RootFolder.ID, true, false);
|
||||
|
@ -1420,7 +1420,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
ScenePresence avatar;
|
||||
|
||||
if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
|
||||
if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar))
|
||||
{
|
||||
destPart.GetProperties(avatar.ControllingClient);
|
||||
}
|
||||
|
@ -1860,7 +1860,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
UUID inventoryID = part.ParentGroup.GetFromItemID();
|
||||
|
||||
ScenePresence presence;
|
||||
if (TryGetAvatar(remoteClient.AgentId, out presence))
|
||||
if (TryGetScenePresence(remoteClient.AgentId, out presence))
|
||||
{
|
||||
if (!Permissions.CanRezObject(part.ParentGroup.Children.Count, remoteClient.AgentId, presence.AbsolutePosition))
|
||||
return;
|
||||
|
|
|
@ -4254,9 +4254,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return m_sceneGraph.GetGroupByPrim(localID);
|
||||
}
|
||||
|
||||
public override bool TryGetAvatar(UUID avatarId, out ScenePresence avatar)
|
||||
public override bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar)
|
||||
{
|
||||
return m_sceneGraph.TryGetAvatar(avatarId, out avatar);
|
||||
return m_sceneGraph.TryGetScenePresence(avatarId, out avatar);
|
||||
}
|
||||
|
||||
public bool TryGetAvatarByName(string avatarName, out ScenePresence avatar)
|
||||
|
|
|
@ -190,11 +190,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="agentID"></param>
|
||||
public abstract void RemoveClient(UUID agentID);
|
||||
|
||||
public bool TryGetAvatar(UUID agentID, out object scenePresence)
|
||||
public bool TryGetScenePresence(UUID agentID, out object scenePresence)
|
||||
{
|
||||
scenePresence = null;
|
||||
ScenePresence sp = null;
|
||||
if (TryGetAvatar(agentID, out sp))
|
||||
if (TryGetScenePresence(agentID, out sp))
|
||||
{
|
||||
scenePresence = sp;
|
||||
return true;
|
||||
|
@ -203,7 +203,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return false;
|
||||
}
|
||||
|
||||
public abstract bool TryGetAvatar(UUID agentID, out ScenePresence scenePresence);
|
||||
public abstract bool TryGetScenePresence(UUID agentID, out ScenePresence scenePresence);
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -756,7 +756,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return null;
|
||||
}
|
||||
|
||||
protected internal bool TryGetAvatar(UUID agentID, out ScenePresence avatar)
|
||||
protected internal bool TryGetScenePresence(UUID agentID, out ScenePresence avatar)
|
||||
{
|
||||
lock (m_scenePresences)
|
||||
{
|
||||
|
|
|
@ -486,11 +486,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
ForEachCurrentScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); });
|
||||
}
|
||||
|
||||
public bool TryGetAvatar(UUID avatarId, out ScenePresence avatar)
|
||||
public bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar)
|
||||
{
|
||||
foreach (Scene scene in m_localScenes)
|
||||
{
|
||||
if (scene.TryGetAvatar(avatarId, out avatar))
|
||||
if (scene.TryGetScenePresence(avatarId, out avatar))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
ScenePresence avatar = null;
|
||||
foreach (Scene mScene in m_localScenes)
|
||||
{
|
||||
if (mScene.TryGetAvatar(avatarId, out avatar))
|
||||
if (mScene.TryGetScenePresence(avatarId, out avatar))
|
||||
{
|
||||
scene = mScene;
|
||||
return true;
|
||||
|
|
|
@ -680,7 +680,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (m_parentGroup != null) // TODO can there be a SOP without a SOG?
|
||||
{
|
||||
ScenePresence avatar;
|
||||
if (m_parentGroup.Scene.TryGetAvatar(m_sitTargetAvatar, out avatar))
|
||||
if (m_parentGroup.Scene.TryGetScenePresence(m_sitTargetAvatar, out avatar))
|
||||
{
|
||||
avatar.ParentPosition = GetWorldPosition();
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override bool TryGetAvatar(UUID agentID, out ScenePresence scenePresence)
|
||||
public override bool TryGetScenePresence(UUID agentID, out ScenePresence scenePresence)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
|
|
@ -520,7 +520,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
|
|||
// protected void AnnounceToAgentsRegion(Scene scene, string msg)
|
||||
// {
|
||||
// ScenePresence agent = null;
|
||||
// if ((client.Scene is Scene) && (client.Scene as Scene).TryGetAvatar(client.AgentId, out agent))
|
||||
// if ((client.Scene is Scene) && (client.Scene as Scene).TryGetScenePresence(client.AgentId, out agent))
|
||||
// AnnounceToAgentsRegion(agent, msg);
|
||||
// else
|
||||
// m_log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name);
|
||||
|
|
|
@ -110,7 +110,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
if (m_avatars.ContainsKey(agentID))
|
||||
{
|
||||
ScenePresence sp;
|
||||
scene.TryGetAvatar(agentID, out sp);
|
||||
scene.TryGetScenePresence(agentID, out sp);
|
||||
sp.DoAutoPilot(0, pos, m_avatars[agentID]);
|
||||
}
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
p_scene.AddNewClient(npcAvatar);
|
||||
|
||||
ScenePresence sp;
|
||||
if (p_scene.TryGetAvatar(npcAvatar.AgentId, out sp))
|
||||
if (p_scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
|
||||
{
|
||||
AvatarAppearance x = GetAppearance(p_cloneAppearanceFrom, p_scene);
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
|||
{
|
||||
ScenePresence sp;
|
||||
// Try direct lookup by UUID
|
||||
if(!m_CmdManager.m_ScriptEngine.World.TryGetAvatar(ts.keyID, out sp))
|
||||
if(!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out sp))
|
||||
return sensedEntities;
|
||||
senseEntity(sp);
|
||||
}
|
||||
|
|
|
@ -301,7 +301,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
private void SignificantClientMovementHandler(IClientAPI client)
|
||||
{
|
||||
ScenePresence sp;
|
||||
if (client.Scene is Scene && ((Scene)client.Scene).TryGetAvatar(client.AgentId, out sp))
|
||||
if (client.Scene is Scene && ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out sp))
|
||||
ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
client.OnConnectionClosed -= LogoutHandler;
|
||||
|
||||
object obj;
|
||||
if (client.Scene.TryGetAvatar(client.AgentId, out obj) && obj is ScenePresence)
|
||||
if (client.Scene.TryGetScenePresence(client.AgentId, out obj) && obj is ScenePresence)
|
||||
{
|
||||
// The avatar is still in the scene, we can get the exact logout position
|
||||
ScenePresence sp = (ScenePresence)obj;
|
||||
|
|
Loading…
Reference in New Issue