mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
Very Preliminary border crossing added to sugilite. (Note: Sugilite doesn't have any backend ogs communication support yet so everything is Sandbox mode only )
This commit is contained in:
@@ -166,7 +166,7 @@ namespace OpenSim
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="regInfo"></param>
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -163,7 +163,6 @@ namespace OpenSim
|
||||
{
|
||||
OnCompleteMovementToRegion();
|
||||
}
|
||||
// this.EnableNeighbours();
|
||||
break;
|
||||
case PacketType.AgentUpdate:
|
||||
if (OnAgentUpdate != null)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user