Another commit as ordered by robl
parent
564a97b508
commit
e92ab35b05
|
@ -50,7 +50,7 @@ namespace OpenGrid.Framework.Communications
|
|||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual bool InformNeighbourOfChildAgent( uint regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
|
||||
public virtual bool InformNeighbourOfChildAgent( ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace OpenGrid.Framework.Communications
|
|||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool InformNeighbourOfChildAgent(uint regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
|
||||
public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -84,5 +84,6 @@ namespace OpenSim.Framework.Interfaces
|
|||
void SendRegionHandshake(RegionInfo regionInfo);
|
||||
void MoveAgentIntoRegion(RegionInfo regInfo);
|
||||
void SendAvatarData(RegionInfo regionInfo, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos);
|
||||
AgentCircuitData RequestClientInfo();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -373,6 +373,35 @@ namespace OpenSim
|
|||
|
||||
return objdata;
|
||||
}
|
||||
|
||||
protected void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort)
|
||||
{
|
||||
EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket();
|
||||
enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock();
|
||||
enablesimpacket.SimulatorInfo.Handle = neighbourHandle;
|
||||
|
||||
byte[] byteIP = neighbourIP.GetAddressBytes();
|
||||
enablesimpacket.SimulatorInfo.IP = (uint)byteIP[3] << 24;
|
||||
enablesimpacket.SimulatorInfo.IP += (uint)byteIP[2] << 16;
|
||||
enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8;
|
||||
enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0];
|
||||
enablesimpacket.SimulatorInfo.Port = neighbourPort;
|
||||
OutPacket(enablesimpacket);
|
||||
}
|
||||
|
||||
public AgentCircuitData RequestClientInfo()
|
||||
{
|
||||
AgentCircuitData agentData = new AgentCircuitData();
|
||||
agentData.AgentID = this.AgentId;
|
||||
agentData.SessionID = this.SessionID;
|
||||
agentData.SecureSessionID = this.SecureSessionID;
|
||||
agentData.circuitcode = this.CircuitCode;
|
||||
agentData.child = false;
|
||||
agentData.firstname = this.firstName;
|
||||
agentData.lastname = this.lastName;
|
||||
|
||||
return agentData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
|
|
@ -268,6 +268,7 @@ namespace OpenSim.world
|
|||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Regenerate Terrain
|
||||
|
||||
/// <summary>
|
||||
|
@ -451,6 +452,7 @@ namespace OpenSim.world
|
|||
remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData);
|
||||
//remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
|
||||
remoteClient.OnChatFromViewer += new ChatFromViewer(this.SimChat);
|
||||
remoteClient.OnRequestWearables += new GenericCall(this.InformClientOfNeighbours);
|
||||
|
||||
Avatar newAvatar = null;
|
||||
try
|
||||
|
@ -497,6 +499,24 @@ namespace OpenSim.world
|
|||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
protected void InformClientOfNeighbours(IClientAPI remoteClient)
|
||||
{
|
||||
List<RegionInfo> neighbours = this.commsManager.RequestNeighbours(this.m_regInfo);
|
||||
|
||||
|
||||
for (int i = 0; i < neighbours.Count; i++)
|
||||
{
|
||||
AgentCircuitData agent = remoteClient.RequestClientInfo();
|
||||
agent.BaseFolder = LLUUID.Zero;
|
||||
agent.InventoryFolder = LLUUID.Zero;
|
||||
agent.startpos = new LLVector3(128, 128, 70);
|
||||
this.commsManager.InformNeighbourOfChildAgent(neighbours[i].RegionHandle, agent);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -556,7 +576,7 @@ namespace OpenSim.world
|
|||
}
|
||||
}
|
||||
|
||||
public void NewUserConnection(ulong regionHandle,AgentCircuitData agent)
|
||||
public void NewUserConnection(ulong regionHandle, AgentCircuitData agent)
|
||||
{
|
||||
Console.WriteLine("World.cs - add new user connection");
|
||||
//should just check that its meant for this region
|
||||
|
|
Loading…
Reference in New Issue