From 274ce6987e0b017800ddb62fe65143e0d5e1cae5 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 19 May 2007 18:32:01 +0000 Subject: Border crossing back to mostly working, still seems a problem in that you need to stop walking just after you cross the border for it to work properly (else you will continue moving into a negative position in the first sim) --- OpenSim.RegionServer/AuthenticateSessionsBase.cs | 23 +++++++++++++++++++++- OpenSim.RegionServer/AuthenticateSessionsRemote.cs | 2 ++ OpenSim.RegionServer/SimClient.cs | 8 ++++++-- OpenSim.RegionServer/world/World.cs | 2 +- 4 files changed, 31 insertions(+), 4 deletions(-) (limited to 'OpenSim.RegionServer') diff --git a/OpenSim.RegionServer/AuthenticateSessionsBase.cs b/OpenSim.RegionServer/AuthenticateSessionsBase.cs index f784f54..91bc54d 100644 --- a/OpenSim.RegionServer/AuthenticateSessionsBase.cs +++ b/OpenSim.RegionServer/AuthenticateSessionsBase.cs @@ -81,8 +81,29 @@ namespace OpenSim this.AgentCircuits[(uint)agentData.circuitcode].firstname = agentData.firstname; this.AgentCircuits[(uint)agentData.circuitcode].lastname = agentData.lastname; this.AgentCircuits[(uint)agentData.circuitcode].startpos = agentData.startpos; + // Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z); + + } + + } + + public void UpdateAgentChildStatus(uint circuitcode, bool childstatus) + { + if (this.AgentCircuits.ContainsKey(circuitcode)) + { + this.AgentCircuits[circuitcode].child = childstatus; + + } + } + + public bool GetAgentChildStatus(uint circuitcode) + { + if (this.AgentCircuits.ContainsKey(circuitcode)) + { + return this.AgentCircuits[circuitcode].child; + } - + return false; } } } diff --git a/OpenSim.RegionServer/AuthenticateSessionsRemote.cs b/OpenSim.RegionServer/AuthenticateSessionsRemote.cs index 57c98e4..0802d75 100644 --- a/OpenSim.RegionServer/AuthenticateSessionsRemote.cs +++ b/OpenSim.RegionServer/AuthenticateSessionsRemote.cs @@ -34,6 +34,8 @@ namespace OpenSim { agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"])); agentData.child = false; + // Console.WriteLine("expect user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z); + } this.AddNewCircuit(agentData.circuitcode, agentData); diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index daaa6dd..9ae08f4 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs @@ -118,7 +118,9 @@ namespace OpenSim if (m_gridServer.GetName() == "Remote") { + this.m_child = m_authenticateSessionsHandler.GetAgentChildStatus(initialcirpack.CircuitCode.Code); this.startpos = m_authenticateSessionsHandler.GetPosition(initialcirpack.CircuitCode.Code); + //Console.WriteLine("start pos is " + this.startpos.X + " , " + this.startpos.Y + " , " + this.startpos.Z); } else { @@ -142,13 +144,15 @@ namespace OpenSim # region Client Methods public void UpgradeClient() { + Console.WriteLine("updateclient being called"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - upgrading child to full agent"); this.m_child = false; this.m_world.RemoveViewerAgent(this); if (!this.m_sandboxMode) { - this.startpos = ((RemoteGridBase)m_gridServer).agentcircuits[CircuitCode].startpos; - ((RemoteGridBase)m_gridServer).agentcircuits[CircuitCode].child = false; + this.startpos = m_authenticateSessionsHandler.GetPosition(CircuitCode); + m_authenticateSessionsHandler.UpdateAgentChildStatus(CircuitCode, false); + //Console.WriteLine("upgrade start pos is " + this.startpos.X + " , " + this.startpos.Y + " , " + this.startpos.Z); } this.InitNewClient(); } diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 72214d4..ecf9c69 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs @@ -585,7 +585,7 @@ namespace OpenSim.world } if (agentClient.ClientAvatar.PhysActor != null) { - this.phyScene.RemoveAvatar(agentClient.ClientAvatar.PhysActor); + //this.phyScene.RemoveAvatar(agentClient.ClientAvatar.PhysActor); } } catch (Exception e) -- cgit v1.1