From d4335671787f3cc5adba53ee2558c62cdb1c27d4 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Thu, 21 Aug 2008 14:23:29 +0000 Subject: [PATCH] Mantis#904. Thank you kindly, Jonc for a patch that solves: LocalLoginService does not send the last position coords in the login response. This patch fixes the issue. --- .../Region/Communications/Local/LocalLoginService.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index f16fd7d976..864d58c047 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -135,10 +135,17 @@ namespace OpenSim.Region.Communications.Local if (startLocationRequest == "last") { currentRegion = theUser.CurrentAgent.Handle; + locX = (UInt32)theUser.CurrentAgent.Position.X; + locY = (UInt32)theUser.CurrentAgent.Position.Y; + locZ = (UInt32)theUser.CurrentAgent.Position.Z; + response.StartLocation = "last"; + specificStartLocation = true; } else if (startLocationRequest == "home") { currentRegion = theUser.HomeRegion; + response.StartLocation = "home"; + } else { @@ -166,6 +173,8 @@ namespace OpenSim.Region.Communications.Local locX = UInt32.Parse(uriMatch.Groups["x"].ToString()); locY = UInt32.Parse(uriMatch.Groups["y"].ToString()); locZ = UInt32.Parse(uriMatch.Groups["z"].ToString()); + // can be: last, home, safe, url + response.StartLocation = "url"; specificStartLocation = true; } } @@ -196,9 +205,6 @@ namespace OpenSim.Region.Communications.Local m_log.DebugFormat( "[CAPS][LOGIN]: RegionX {0} RegionY {0}", response.RegionX, response.RegionY); - // can be: last, home, safe, url - if (specificStartLocation) response.StartLocation = "url"; - response.SeedCapability = "http://" + reg.ExternalHostName + ":" + serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/";