Border crossing back to mostly working, still seems a problem in that you need to stop walking just after you cross the border for it to work properly (else you will continue moving into a negative position in the first sim)
parent
e0b724e9aa
commit
274ce6987e
|
@ -81,8 +81,29 @@ namespace OpenSim
|
||||||
this.AgentCircuits[(uint)agentData.circuitcode].firstname = agentData.firstname;
|
this.AgentCircuits[(uint)agentData.circuitcode].firstname = agentData.firstname;
|
||||||
this.AgentCircuits[(uint)agentData.circuitcode].lastname = agentData.lastname;
|
this.AgentCircuits[(uint)agentData.circuitcode].lastname = agentData.lastname;
|
||||||
this.AgentCircuits[(uint)agentData.circuitcode].startpos = agentData.startpos;
|
this.AgentCircuits[(uint)agentData.circuitcode].startpos = agentData.startpos;
|
||||||
|
// Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UpdateAgentChildStatus(uint circuitcode, bool childstatus)
|
||||||
|
{
|
||||||
|
if (this.AgentCircuits.ContainsKey(circuitcode))
|
||||||
|
{
|
||||||
|
this.AgentCircuits[circuitcode].child = childstatus;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool GetAgentChildStatus(uint circuitcode)
|
||||||
|
{
|
||||||
|
if (this.AgentCircuits.ContainsKey(circuitcode))
|
||||||
|
{
|
||||||
|
return this.AgentCircuits[circuitcode].child;
|
||||||
|
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,8 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"]));
|
agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"]));
|
||||||
agentData.child = false;
|
agentData.child = false;
|
||||||
|
// Console.WriteLine("expect user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.AddNewCircuit(agentData.circuitcode, agentData);
|
this.AddNewCircuit(agentData.circuitcode, agentData);
|
||||||
|
|
|
@ -118,7 +118,9 @@ namespace OpenSim
|
||||||
|
|
||||||
if (m_gridServer.GetName() == "Remote")
|
if (m_gridServer.GetName() == "Remote")
|
||||||
{
|
{
|
||||||
|
this.m_child = m_authenticateSessionsHandler.GetAgentChildStatus(initialcirpack.CircuitCode.Code);
|
||||||
this.startpos = m_authenticateSessionsHandler.GetPosition(initialcirpack.CircuitCode.Code);
|
this.startpos = m_authenticateSessionsHandler.GetPosition(initialcirpack.CircuitCode.Code);
|
||||||
|
//Console.WriteLine("start pos is " + this.startpos.X + " , " + this.startpos.Y + " , " + this.startpos.Z);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -142,13 +144,15 @@ namespace OpenSim
|
||||||
# region Client Methods
|
# region Client Methods
|
||||||
public void UpgradeClient()
|
public void UpgradeClient()
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("updateclient being called");
|
||||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - upgrading child to full agent");
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "SimClient.cs:UpgradeClient() - upgrading child to full agent");
|
||||||
this.m_child = false;
|
this.m_child = false;
|
||||||
this.m_world.RemoveViewerAgent(this);
|
this.m_world.RemoveViewerAgent(this);
|
||||||
if (!this.m_sandboxMode)
|
if (!this.m_sandboxMode)
|
||||||
{
|
{
|
||||||
this.startpos = ((RemoteGridBase)m_gridServer).agentcircuits[CircuitCode].startpos;
|
this.startpos = m_authenticateSessionsHandler.GetPosition(CircuitCode);
|
||||||
((RemoteGridBase)m_gridServer).agentcircuits[CircuitCode].child = false;
|
m_authenticateSessionsHandler.UpdateAgentChildStatus(CircuitCode, false);
|
||||||
|
//Console.WriteLine("upgrade start pos is " + this.startpos.X + " , " + this.startpos.Y + " , " + this.startpos.Z);
|
||||||
}
|
}
|
||||||
this.InitNewClient();
|
this.InitNewClient();
|
||||||
}
|
}
|
||||||
|
|
|
@ -585,7 +585,7 @@ namespace OpenSim.world
|
||||||
}
|
}
|
||||||
if (agentClient.ClientAvatar.PhysActor != null)
|
if (agentClient.ClientAvatar.PhysActor != null)
|
||||||
{
|
{
|
||||||
this.phyScene.RemoveAvatar(agentClient.ClientAvatar.PhysActor);
|
//this.phyScene.RemoveAvatar(agentClient.ClientAvatar.PhysActor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -17,12 +17,11 @@ namespace OpenSim.Servers
|
||||||
{
|
{
|
||||||
public class CheckSumServer : UDPServerBase
|
public class CheckSumServer : UDPServerBase
|
||||||
{
|
{
|
||||||
protected ConsoleBase m_console;
|
//protected ConsoleBase m_console;
|
||||||
|
|
||||||
public CheckSumServer(int port, ConsoleBase console)
|
public CheckSumServer(int port)
|
||||||
|
: base(port)
|
||||||
{
|
{
|
||||||
listenPort = port;
|
|
||||||
this.m_console = console;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnReceivedData(IAsyncResult result)
|
protected override void OnReceivedData(IAsyncResult result)
|
||||||
|
@ -35,10 +34,8 @@ namespace OpenSim.Servers
|
||||||
|
|
||||||
packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
|
packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
|
||||||
|
|
||||||
// do we already have a circuit for this endpoint
|
|
||||||
if (packet.Type == PacketType.SecuredTemplateChecksumRequest)
|
if (packet.Type == PacketType.SecuredTemplateChecksumRequest)
|
||||||
{
|
{
|
||||||
|
|
||||||
SecuredTemplateChecksumRequestPacket checksum = (SecuredTemplateChecksumRequestPacket)packet;
|
SecuredTemplateChecksumRequestPacket checksum = (SecuredTemplateChecksumRequestPacket)packet;
|
||||||
TemplateChecksumReplyPacket checkreply = new TemplateChecksumReplyPacket();
|
TemplateChecksumReplyPacket checkreply = new TemplateChecksumReplyPacket();
|
||||||
checkreply.DataBlock.Checksum = 180572585;
|
checkreply.DataBlock.Checksum = 180572585;
|
||||||
|
@ -56,22 +53,20 @@ namespace OpenSim.Servers
|
||||||
checkrequest.TokenBlock.Token = checksum.TokenBlock.Token;
|
checkrequest.TokenBlock.Token = checksum.TokenBlock.Token;
|
||||||
this.SendPacket(checkrequest, epSender);
|
this.SendPacket(checkrequest, epSender);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (packet.Type == PacketType.TemplateChecksumReply)
|
else if (packet.Type == PacketType.TemplateChecksumReply)
|
||||||
{
|
{
|
||||||
//echo back the client checksum reply (Hegemon's method)
|
//echo back the client checksum reply (Hegemon's method)
|
||||||
TemplateChecksumReplyPacket checksum = (TemplateChecksumReplyPacket)packet;
|
TemplateChecksumReplyPacket checksum2 = (TemplateChecksumReplyPacket)packet;
|
||||||
TemplateChecksumReplyPacket checkreply2 = new TemplateChecksumReplyPacket();
|
TemplateChecksumReplyPacket checkreply2 = new TemplateChecksumReplyPacket();
|
||||||
checkreply2.DataBlock.Checksum = checksum.DataBlock.Checksum;
|
checkreply2.DataBlock.Checksum = checksum2.DataBlock.Checksum;
|
||||||
checkreply2.DataBlock.Flags = checksum.DataBlock.Flags;
|
checkreply2.DataBlock.Flags = checksum2.DataBlock.Flags;
|
||||||
checkreply2.DataBlock.MajorVersion = checksum.DataBlock.MajorVersion;
|
checkreply2.DataBlock.MajorVersion = checksum2.DataBlock.MajorVersion;
|
||||||
checkreply2.DataBlock.MinorVersion = checksum.DataBlock.MinorVersion;
|
checkreply2.DataBlock.MinorVersion = checksum2.DataBlock.MinorVersion;
|
||||||
checkreply2.DataBlock.PatchVersion = checksum.DataBlock.PatchVersion;
|
checkreply2.DataBlock.PatchVersion = checksum2.DataBlock.PatchVersion;
|
||||||
checkreply2.DataBlock.ServerVersion = checksum.DataBlock.ServerVersion;
|
checkreply2.DataBlock.ServerVersion = checksum2.DataBlock.ServerVersion;
|
||||||
checkreply2.TokenBlock.Token = checksum.TokenBlock.Token;
|
checkreply2.TokenBlock.Token = checksum2.TokenBlock.Token;
|
||||||
this.SendPacket(checkreply2, epSender);
|
this.SendPacket(checkreply2, epSender);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -80,16 +75,13 @@ namespace OpenSim.Servers
|
||||||
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void SendPacket(Packet Pack, EndPoint endp)
|
private void SendPacket(Packet Pack, EndPoint endp)
|
||||||
{
|
{
|
||||||
if (!Pack.Header.Resent)
|
if (!Pack.Header.Resent)
|
||||||
{
|
{
|
||||||
// Set the sequence number
|
|
||||||
|
|
||||||
Pack.Header.Sequence = 1;
|
Pack.Header.Sequence = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] ZeroOutBuffer = new byte[4096];
|
byte[] ZeroOutBuffer = new byte[4096];
|
||||||
byte[] sendbuffer;
|
byte[] sendbuffer;
|
||||||
sendbuffer = Pack.ToBytes();
|
sendbuffer = Pack.ToBytes();
|
||||||
|
|
|
@ -24,8 +24,9 @@ namespace OpenSim.Servers
|
||||||
protected AsyncCallback ReceivedData;
|
protected AsyncCallback ReceivedData;
|
||||||
protected int listenPort;
|
protected int listenPort;
|
||||||
|
|
||||||
public UDPServerBase()
|
public UDPServerBase(int port)
|
||||||
{
|
{
|
||||||
|
listenPort = port;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnReceivedData(IAsyncResult result)
|
protected virtual void OnReceivedData(IAsyncResult result)
|
||||||
|
@ -38,8 +39,6 @@ namespace OpenSim.Servers
|
||||||
|
|
||||||
packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
|
packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,14 +59,10 @@ namespace OpenSim.Servers
|
||||||
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)
|
public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)
|
||||||
{
|
{
|
||||||
// find the endpoint for this circuit
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ namespace OpenSim
|
||||||
//Authenticate Session Handler
|
//Authenticate Session Handler
|
||||||
AuthenticateSessionsLocal authen = new AuthenticateSessionsLocal();
|
AuthenticateSessionsLocal authen = new AuthenticateSessionsLocal();
|
||||||
this.AuthenticateSessionsHandler = authen;
|
this.AuthenticateSessionsHandler = authen;
|
||||||
this.checkServer = new CheckSumServer(12036, m_console);
|
this.checkServer = new CheckSumServer(12036);
|
||||||
this.checkServer.ServerListener();
|
this.checkServer.ServerListener();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue