From 2912aafe259727351eb9405532e45aa3501b7e9a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 25 Aug 2008 07:35:17 +0000 Subject: * This commit incorporates the heart of the OpenGridProtocol patch that is currently on Forge in a nice, friendly modular format. * There are a lot of changes and this is quite experimental. It's off by default, but you can turn it on by examining the bottom of the opensim.ini.example for the proper OpenSim.ini settings. Remember, you still need an agent domain.. * Furthermore, it isn't quite right when it comes to teleporting to remote regions (place_avatar) --- OpenSim/Framework/AgentCircuitManager.cs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'OpenSim/Framework/AgentCircuitManager.cs') diff --git a/OpenSim/Framework/AgentCircuitManager.cs b/OpenSim/Framework/AgentCircuitManager.cs index 426e8e2..80e2f87 100644 --- a/OpenSim/Framework/AgentCircuitManager.cs +++ b/OpenSim/Framework/AgentCircuitManager.cs @@ -103,10 +103,41 @@ namespace OpenSim.Framework AgentCircuits[(uint) agentData.circuitcode].firstname = agentData.firstname; AgentCircuits[(uint) agentData.circuitcode].lastname = agentData.lastname; AgentCircuits[(uint) agentData.circuitcode].startpos = agentData.startpos; + + // Updated for when we don't know them before calling Scene.NewUserConnection + AgentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID; + AgentCircuits[(uint) agentData.circuitcode].SessionID = agentData.SessionID; + // Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z); } } + + /// + /// Sometimes the circuitcode may not be known before setting up the connection + /// + /// + /// + + public bool TryChangeCiruitCode(uint circuitcode, uint newcircuitcode) + { + lock (AgentCircuits) + { + if (AgentCircuits.ContainsKey((uint)circuitcode) && !AgentCircuits.ContainsKey((uint)newcircuitcode)) + { + AgentCircuitData agentData = AgentCircuits[(uint)circuitcode]; + + agentData.circuitcode = newcircuitcode; + + AgentCircuits.Remove((uint)circuitcode); + AgentCircuits.Add(newcircuitcode, agentData); + return true; + } + } + return false; + + } + public void UpdateAgentChildStatus(uint circuitcode, bool childstatus) { if (AgentCircuits.ContainsKey(circuitcode)) -- cgit v1.1