aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer')
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.API.cs34
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs1
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.cs13
3 files changed, 41 insertions, 7 deletions
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
index 33727c4..b126004 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
@@ -166,7 +166,7 @@ namespace OpenSim
166 /// 166 ///
167 /// </summary> 167 /// </summary>
168 /// <param name="regInfo"></param> 168 /// <param name="regInfo"></param>
169 public void MoveAgentIntoRegion(RegionInfo regInfo) 169 public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos)
170 { 170 {
171 AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); 171 AgentMovementCompletePacket mov = new AgentMovementCompletePacket();
172 mov.AgentData.SessionID = this.SessionID; 172 mov.AgentData.SessionID = this.SessionID;
@@ -174,7 +174,14 @@ namespace OpenSim
174 mov.Data.RegionHandle = regInfo.RegionHandle; 174 mov.Data.RegionHandle = regInfo.RegionHandle;
175 // TODO - dynamicalise this stuff 175 // TODO - dynamicalise this stuff
176 mov.Data.Timestamp = 1172750370; 176 mov.Data.Timestamp = 1172750370;
177 mov.Data.Position = this.startpos; 177 if (pos != null)
178 {
179 mov.Data.Position = pos;
180 }
181 else
182 {
183 mov.Data.Position = this.startpos;
184 }
178 mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0); 185 mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0);
179 186
180 OutPacket(mov); 187 OutPacket(mov);
@@ -305,6 +312,29 @@ namespace OpenSim
305 return agentData; 312 return agentData;
306 } 313 }
307 314
315 public void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, System.Net.IPAddress newRegionIP, ushort newRegionPort)
316 {
317 CrossedRegionPacket newSimPack = new CrossedRegionPacket();
318 newSimPack.AgentData = new CrossedRegionPacket.AgentDataBlock();
319 newSimPack.AgentData.AgentID = this.AgentID;
320 newSimPack.AgentData.SessionID = this.SessionID;
321 newSimPack.Info = new CrossedRegionPacket.InfoBlock();
322 newSimPack.Info.Position = pos;
323 newSimPack.Info.LookAt = lookAt; // new LLVector3(0.0f, 0.0f, 0.0f); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!!
324 newSimPack.RegionData = new libsecondlife.Packets.CrossedRegionPacket.RegionDataBlock();
325 newSimPack.RegionData.RegionHandle = newRegionHandle;
326 byte[] byteIP = newRegionIP.GetAddressBytes();
327 newSimPack.RegionData.SimIP = (uint)byteIP[3] << 24;
328 newSimPack.RegionData.SimIP += (uint)byteIP[2] << 16;
329 newSimPack.RegionData.SimIP += (uint)byteIP[1] << 8;
330 newSimPack.RegionData.SimIP += (uint)byteIP[0];
331 newSimPack.RegionData.SimPort = newRegionPort;
332 newSimPack.RegionData.SeedCapability = new byte[0];
333
334 this.OutPacket(newSimPack);
335 this.DowngradeClient();
336 }
337
308 #region Appearance/ Wearables Methods 338 #region Appearance/ Wearables Methods
309 339
310 /// <summary> 340 /// <summary>
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
index f8c7cdb..4cf6ac2 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
@@ -163,7 +163,6 @@ namespace OpenSim
163 { 163 {
164 OnCompleteMovementToRegion(); 164 OnCompleteMovementToRegion();
165 } 165 }
166 // this.EnableNeighbours();
167 break; 166 break;
168 case PacketType.AgentUpdate: 167 case PacketType.AgentUpdate:
169 if (OnAgentUpdate != null) 168 if (OnAgentUpdate != null)
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.cs b/OpenSim/OpenSim.RegionServer/ClientView.cs
index 0943c0d..29c871e 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.cs
@@ -117,17 +117,22 @@ namespace OpenSim
117 { 117 {
118 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - upgrading child to full agent"); 118 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - upgrading child to full agent");
119 this.m_child = false; 119 this.m_child = false;
120 this.startpos = m_authenticateSessionsHandler.GetPosition(CircuitCode); 120 //this.startpos = m_authenticateSessionsHandler.GetPosition(CircuitCode);
121 m_authenticateSessionsHandler.UpdateAgentChildStatus(CircuitCode, false); 121 m_authenticateSessionsHandler.UpdateAgentChildStatus(CircuitCode, false);
122 OnChildAgentStatus(this.m_child); 122 if (OnChildAgentStatus != null)
123 {
124 OnChildAgentStatus(this.m_child);
125 }
123 } 126 }
124 127
125 public void DowngradeClient() 128 public void DowngradeClient()
126 { 129 {
127 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - changing full agent to child"); 130 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - changing full agent to child");
128 this.m_child = true; 131 this.m_child = true;
129 OnChildAgentStatus(this.m_child); 132 if (OnChildAgentStatus != null)
130 133 {
134 OnChildAgentStatus(this.m_child);
135 }
131 } 136 }
132 137
133 public void KillClient() 138 public void KillClient()