mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
GridUserService in place. Replaces the contrived concept of storing user's home and position info in the presence service. WARNING: I violated a taboo by deleting 2 migration files and simplifying the original table creation for Presence. This should not cause any problems to anyone, though. Things will work with the new simplified table, as well as with the previous contrived one. If there are any problems, solving them is as easy as dropping the presence table and deleting its row in the migrations table. The presence info only exists during a user's session anyway.
BTW, the Meshing files want to be committed too -- EOFs.
This commit is contained in:
@@ -526,11 +526,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
{
|
||||
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName);
|
||||
|
||||
OpenSim.Services.Interfaces.PresenceInfo pinfo = m_aScene.PresenceService.GetAgent(client.SessionId);
|
||||
//OpenSim.Services.Interfaces.PresenceInfo pinfo = m_aScene.PresenceService.GetAgent(client.SessionId);
|
||||
GridUserInfo uinfo = m_aScene.GridUserService.GetGridUserInfo(client.AgentId.ToString());
|
||||
|
||||
if (pinfo != null)
|
||||
if (uinfo != null)
|
||||
{
|
||||
GridRegion regionInfo = m_aScene.GridService.GetRegionByUUID(UUID.Zero, pinfo.HomeRegionID);
|
||||
GridRegion regionInfo = m_aScene.GridService.GetRegionByUUID(UUID.Zero, uinfo.HomeRegionID);
|
||||
if (regionInfo == null)
|
||||
{
|
||||
// can't find the Home region: Tell viewer and abort
|
||||
@@ -539,7 +540,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
}
|
||||
// a little eekie that this goes back to Scene and with a forced cast, will fix that at some point...
|
||||
((Scene)(client.Scene)).RequestTeleportLocation(
|
||||
client, regionInfo.RegionHandle, pinfo.HomePosition, pinfo.HomeLookAt,
|
||||
client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt,
|
||||
(uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, out reason);
|
||||
if (success)
|
||||
// Log them out of this grid
|
||||
m_aScene.PresenceService.LogoutAgent(agentCircuit.SessionID, sp.AbsolutePosition, sp.Lookat);
|
||||
m_aScene.PresenceService.LogoutAgent(agentCircuit.SessionID);
|
||||
|
||||
return success;
|
||||
}
|
||||
@@ -238,6 +238,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
{
|
||||
if (obj.IsLoggingOut)
|
||||
{
|
||||
object sp = null;
|
||||
if (obj.Scene.TryGetScenePresence(obj.AgentId, out sp))
|
||||
{
|
||||
if (((ScenePresence)sp).IsChildAgent)
|
||||
return;
|
||||
}
|
||||
|
||||
AgentCircuitData aCircuit = ((Scene)(obj.Scene)).AuthenticateHandler.GetAgentCircuitData(obj.CircuitCode);
|
||||
|
||||
if (aCircuit.ServiceURLs.ContainsKey("HomeURI"))
|
||||
|
||||
Reference in New Issue
Block a user