From 17b4818b8e9a141b54540b342542bcb2ad21b4db Mon Sep 17 00:00:00 2001
From: MW
Date: Fri, 15 Jun 2007 16:03:02 +0000
Subject: Very Preliminary border crossing added to sugilite. (Note: Sugilite
doesn't have any backend ogs communication support yet so everything is
Sandbox mode only )
---
OpenSim/OpenSim.RegionServer/ClientView.API.cs | 34 ++++++++++++++++++++--
.../ClientView.ProcessPackets.cs | 1 -
OpenSim/OpenSim.RegionServer/ClientView.cs | 13 ++++++---
3 files changed, 41 insertions(+), 7 deletions(-)
(limited to 'OpenSim/OpenSim.RegionServer')
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
///
///
///
- public void MoveAgentIntoRegion(RegionInfo regInfo)
+ public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos)
{
AgentMovementCompletePacket mov = new AgentMovementCompletePacket();
mov.AgentData.SessionID = this.SessionID;
@@ -174,7 +174,14 @@ namespace OpenSim
mov.Data.RegionHandle = regInfo.RegionHandle;
// TODO - dynamicalise this stuff
mov.Data.Timestamp = 1172750370;
- mov.Data.Position = this.startpos;
+ if (pos != null)
+ {
+ mov.Data.Position = pos;
+ }
+ else
+ {
+ mov.Data.Position = this.startpos;
+ }
mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0);
OutPacket(mov);
@@ -305,6 +312,29 @@ namespace OpenSim
return agentData;
}
+ public void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, System.Net.IPAddress newRegionIP, ushort newRegionPort)
+ {
+ CrossedRegionPacket newSimPack = new CrossedRegionPacket();
+ newSimPack.AgentData = new CrossedRegionPacket.AgentDataBlock();
+ newSimPack.AgentData.AgentID = this.AgentID;
+ newSimPack.AgentData.SessionID = this.SessionID;
+ newSimPack.Info = new CrossedRegionPacket.InfoBlock();
+ newSimPack.Info.Position = pos;
+ newSimPack.Info.LookAt = lookAt; // new LLVector3(0.0f, 0.0f, 0.0f); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!!
+ newSimPack.RegionData = new libsecondlife.Packets.CrossedRegionPacket.RegionDataBlock();
+ newSimPack.RegionData.RegionHandle = newRegionHandle;
+ byte[] byteIP = newRegionIP.GetAddressBytes();
+ newSimPack.RegionData.SimIP = (uint)byteIP[3] << 24;
+ newSimPack.RegionData.SimIP += (uint)byteIP[2] << 16;
+ newSimPack.RegionData.SimIP += (uint)byteIP[1] << 8;
+ newSimPack.RegionData.SimIP += (uint)byteIP[0];
+ newSimPack.RegionData.SimPort = newRegionPort;
+ newSimPack.RegionData.SeedCapability = new byte[0];
+
+ this.OutPacket(newSimPack);
+ this.DowngradeClient();
+ }
+
#region Appearance/ Wearables Methods
///
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
{
OnCompleteMovementToRegion();
}
- // this.EnableNeighbours();
break;
case PacketType.AgentUpdate:
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
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - upgrading child to full agent");
this.m_child = false;
- this.startpos = m_authenticateSessionsHandler.GetPosition(CircuitCode);
+ //this.startpos = m_authenticateSessionsHandler.GetPosition(CircuitCode);
m_authenticateSessionsHandler.UpdateAgentChildStatus(CircuitCode, false);
- OnChildAgentStatus(this.m_child);
+ if (OnChildAgentStatus != null)
+ {
+ OnChildAgentStatus(this.m_child);
+ }
}
public void DowngradeClient()
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - changing full agent to child");
this.m_child = true;
- OnChildAgentStatus(this.m_child);
-
+ if (OnChildAgentStatus != null)
+ {
+ OnChildAgentStatus(this.m_child);
+ }
}
public void KillClient()
--
cgit v1.1