From 5bf6b245908e15dd3a5a47ec6b2f4602f321ebc5 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 22 Oct 2007 09:04:55 +0000 Subject: [PATCH] Bug fix, so that local loginserver (in standalone mode) can set a start position (position inside the region) rather than it always being hardcoded to 128,128. Note: This bug fix is just to allow this to be set. Its not actually used yet (so users will still always start at 128,128). --- OpenSim/Framework/General/Types/Login.cs | 3 ++- .../Communications/Local/LocalBackEndServices.cs | 13 +++++++------ .../Communications/Local/LocalLoginService.cs | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/OpenSim/Framework/General/Types/Login.cs b/OpenSim/Framework/General/Types/Login.cs index 0a8c0cb33f..fc1f3ad1b5 100644 --- a/OpenSim/Framework/General/Types/Login.cs +++ b/OpenSim/Framework/General/Types/Login.cs @@ -40,10 +40,11 @@ namespace OpenSim.Framework.Types public LLUUID BaseFolder; public uint CircuitCode; public string CapsPath =""; + public LLVector3 StartPos; public Login() { - + StartPos = new LLVector3(128, 128, 70); } } } diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 89213a4f2c..b14bd3d579 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -120,7 +120,7 @@ namespace OpenSim.Region.Communications.Local public List RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) { List mapBlocks = new List(); - foreach(RegionInfo regInfo in this.m_regions.Values) + foreach (RegionInfo regInfo in this.m_regions.Values) { if (((regInfo.RegionLocX >= minX) && (regInfo.RegionLocX <= maxX)) && ((regInfo.RegionLocY >= minY) && (regInfo.RegionLocY <= maxY))) { @@ -128,7 +128,7 @@ namespace OpenSim.Region.Communications.Local map.Name = regInfo.RegionName; map.X = (ushort)regInfo.RegionLocX; map.Y = (ushort)regInfo.RegionLocY; - map.WaterHeight =(byte) regInfo.estateSettings.waterHeight; + map.WaterHeight = (byte)regInfo.estateSettings.waterHeight; map.MapImageId = regInfo.estateSettings.terrainImageID; //new LLUUID("00000000-0000-0000-9999-000000000007"); map.Agents = 1; map.RegionFlags = 72458694; @@ -200,7 +200,8 @@ namespace OpenSim.Region.Communications.Local agent.circuitcode = loginData.CircuitCode; agent.BaseFolder = loginData.BaseFolder; agent.InventoryFolder = loginData.InventoryFolder; - agent.startpos = new LLVector3(128, 128, 70); + agent.startpos = loginData.StartPos; + agent.CapsPath = loginData.CapsPath; TriggerExpectUser(regionHandle, agent); @@ -216,7 +217,7 @@ namespace OpenSim.Region.Communications.Local public void PingCheckReply(Hashtable respData) { - foreach (ulong region in this.m_regions.Keys ) + foreach (ulong region in this.m_regions.Keys) { Hashtable regData = new Hashtable(); RegionInfo reg = m_regions[region]; @@ -229,7 +230,7 @@ namespace OpenSim.Region.Communications.Local public bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) { - if ( m_regionListeners.ContainsKey(regionHandle)) + if (m_regionListeners.ContainsKey(regionHandle)) { return m_regionListeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying); @@ -250,7 +251,7 @@ namespace OpenSim.Region.Communications.Local } - + } } diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 9c10d04de3..37461c00c1 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -137,7 +137,8 @@ namespace OpenSim.Region.Communications.Local _login.Agent = response.AgentID; _login.Session = response.SessionID; _login.SecureSession = response.SecureSessionID; - _login.CircuitCode = (uint)response.CircuitCode; + _login.CircuitCode = (uint)response.CircuitCode; + _login.StartPos = new LLVector3(128, 128, 70); _login.CapsPath = capsPath; if( OnLoginToRegion != null )