From 61b67b2eade480c5fd75c6ba347e117f0e00f055 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 27 Jan 2011 03:49:32 +0100 Subject: Add TeleportFlags.ViaRegionID to the flags sent on login when the region was entered by hand to determine whether or not to honor the landing point --- OpenSim/Services/LLLoginService/LLLoginService.cs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 7568870..1ab63f7 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -320,7 +320,8 @@ namespace OpenSim.Services.LLLoginService Vector3 position = Vector3.Zero; Vector3 lookAt = Vector3.Zero; GridRegion gatekeeper = null; - GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt); + TeleportFlags flags; + GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt, out flags); if (destination == null) { m_PresenceService.LogoutAgent(session); @@ -343,7 +344,7 @@ namespace OpenSim.Services.LLLoginService string reason = string.Empty; GridRegion dest; AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, - clientVersion, channel, mac, id0, clientIP, out where, out reason, out dest); + clientVersion, channel, mac, id0, clientIP, flags, out where, out reason, out dest); destination = dest; if (aCircuit == null) { @@ -378,8 +379,10 @@ namespace OpenSim.Services.LLLoginService } } - protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt) + protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags) { + flags = TeleportFlags.ViaLogin; + m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation); gatekeeper = null; @@ -473,6 +476,8 @@ namespace OpenSim.Services.LLLoginService } else { + flags |= TeleportFlags.ViaRegionID; + // free uri form // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 where = "url"; @@ -624,7 +629,7 @@ namespace OpenSim.Services.LLLoginService protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar, UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0, - IPEndPoint clientIP, out string where, out string reason, out GridRegion dest) + IPEndPoint clientIP, TeleportFlags flags, out string where, out string reason, out GridRegion dest) { where = currentWhere; ISimulationService simConnector = null; @@ -663,7 +668,7 @@ namespace OpenSim.Services.LLLoginService { circuitCode = (uint)Util.RandomClass.Next(); ; aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0); - success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason); + success = LaunchAgentDirectly(simConnector, destination, aCircuit, flags, out reason); if (!success && m_GridService != null) { // Try the fallback regions @@ -672,7 +677,7 @@ namespace OpenSim.Services.LLLoginService { foreach (GridRegion r in fallbacks) { - success = LaunchAgentDirectly(simConnector, r, aCircuit, out reason); + success = LaunchAgentDirectly(simConnector, r, aCircuit, flags | TeleportFlags.ViaRegionID, out reason); if (success) { where = "safe"; @@ -795,9 +800,9 @@ namespace OpenSim.Services.LLLoginService } - private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, out string reason) + private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) { - return simConnector.CreateAgent(region, aCircuit, (int)Constants.TeleportFlags.ViaLogin, out reason); + return simConnector.CreateAgent(region, aCircuit, (uint)flags, out reason); } private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) -- cgit v1.1