diff options
Diffstat (limited to 'OpenSim/Framework/AgentCircuitManager.cs')
-rw-r--r-- | OpenSim/Framework/AgentCircuitManager.cs | 31 |
1 files changed, 31 insertions, 0 deletions
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 | |||
103 | AgentCircuits[(uint) agentData.circuitcode].firstname = agentData.firstname; | 103 | AgentCircuits[(uint) agentData.circuitcode].firstname = agentData.firstname; |
104 | AgentCircuits[(uint) agentData.circuitcode].lastname = agentData.lastname; | 104 | AgentCircuits[(uint) agentData.circuitcode].lastname = agentData.lastname; |
105 | AgentCircuits[(uint) agentData.circuitcode].startpos = agentData.startpos; | 105 | AgentCircuits[(uint) agentData.circuitcode].startpos = agentData.startpos; |
106 | |||
107 | // Updated for when we don't know them before calling Scene.NewUserConnection | ||
108 | AgentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID; | ||
109 | AgentCircuits[(uint) agentData.circuitcode].SessionID = agentData.SessionID; | ||
110 | |||
106 | // Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z); | 111 | // Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z); |
107 | } | 112 | } |
108 | } | 113 | } |
109 | 114 | ||
115 | |||
116 | /// <summary> | ||
117 | /// Sometimes the circuitcode may not be known before setting up the connection | ||
118 | /// </summary> | ||
119 | /// <param name="circuitcode"></param> | ||
120 | /// <param name="newcircuitcode"></param> | ||
121 | |||
122 | public bool TryChangeCiruitCode(uint circuitcode, uint newcircuitcode) | ||
123 | { | ||
124 | lock (AgentCircuits) | ||
125 | { | ||
126 | if (AgentCircuits.ContainsKey((uint)circuitcode) && !AgentCircuits.ContainsKey((uint)newcircuitcode)) | ||
127 | { | ||
128 | AgentCircuitData agentData = AgentCircuits[(uint)circuitcode]; | ||
129 | |||
130 | agentData.circuitcode = newcircuitcode; | ||
131 | |||
132 | AgentCircuits.Remove((uint)circuitcode); | ||
133 | AgentCircuits.Add(newcircuitcode, agentData); | ||
134 | return true; | ||
135 | } | ||
136 | } | ||
137 | return false; | ||
138 | |||
139 | } | ||
140 | |||
110 | public void UpdateAgentChildStatus(uint circuitcode, bool childstatus) | 141 | public void UpdateAgentChildStatus(uint circuitcode, bool childstatus) |
111 | { | 142 | { |
112 | if (AgentCircuits.ContainsKey(circuitcode)) | 143 | if (AgentCircuits.ContainsKey(circuitcode)) |