From a253ac0830d5cb39f703393d3696e504dee0c67d Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 10 Apr 2008 09:56:59 +0000 Subject: Patch by lulurun - 0000916: support secondlife client's "-url sim/x/y/z" option Thanks lulurun! --- OpenSim/Grid/UserServer/UserLoginService.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index f6bd974..d409951 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -78,6 +78,9 @@ namespace OpenSim.Grid.UserServer try { RegionProfileData SimInfo = null; + int start_x = -1; + int start_y = -1; + int start_z = -1; if (startLocationRequest == "last") { SimInfo = @@ -119,6 +122,10 @@ namespace OpenSim.Grid.UserServer RegionProfileData.RequestSimProfileData( theUser.homeRegion, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); + } else { + start_x = Convert.ToInt32(startLocationRequestParsed[1]); + start_y = Convert.ToInt32(startLocationRequestParsed[2]); + start_z = Convert.ToInt32(startLocationRequestParsed[3]); } } } @@ -159,7 +166,11 @@ namespace OpenSim.Grid.UserServer theUser.currentAgent.currentRegion = SimInfo.UUID; theUser.currentAgent.currentHandle = SimInfo.regionHandle; - + if (start_x >= 0 && start_y >= 0 && start_z >= 0) { + theUser.currentAgent.currentPos.X = start_x; + theUser.currentAgent.currentPos.Y = start_y; + theUser.currentAgent.currentPos.Z = start_z; + } // Prepare notification Hashtable SimParams = new Hashtable(); SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); -- cgit v1.1