avinationmerge
UbitUmarov 2014-08-04 21:52:29 +01:00
parent 3d81f25e34
commit 3cca5ec667
3 changed files with 598 additions and 606 deletions

View File

@ -1750,25 +1750,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
endPoint,
sessionInfo);
// Send ack straight away to let the viewer know that the connection is active.
// The client will be null if it already exists (e.g. if on a region crossing the client sends a use
// circuit code to the existing child agent. This is not particularly obvious.
SendAckImmediate(endPoint, uccp.Header.Sequence);
// We only want to send initial data to new clients, not ones which are being converted from child to root.
if (client != null)
{
AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code);
bool tp = (aCircuit.teleportFlags > 0);
// Let's delay this for TP agents, otherwise the viewer doesn't know where to get resources from
if (!tp)
client.SceneAgent.SendInitialDataToMe();
}
// Now we know we can handle more data
Thread.Sleep(200);
// Thread.Sleep(200);
// Obtain the queue and remove it from the cache
// Obtain the pending queue and remove it from the cache
Queue<UDPPacketBuffer> queue = null;
lock (m_pendingCache)
@ -1790,6 +1775,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
PacketReceived(buf);
}
queue = null;
// Send ack straight away to let the viewer know that the connection is active.
// The client will be null if it already exists (e.g. if on a region crossing the client sends a use
// circuit code to the existing child agent. This is not particularly obvious.
SendAckImmediate(endPoint, uccp.Header.Sequence);
// We only want to send initial data to new clients, not ones which are being converted from child to root.
if (client != null)
{
AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code);
bool tp = (aCircuit.teleportFlags > 0);
// Let's delay this for TP agents, otherwise the viewer doesn't know where to get resources from
if (!tp)
client.SceneAgent.SendInitialDataToMe();
}
}
else
{

View File

@ -3369,19 +3369,11 @@ namespace OpenSim.Region.Framework.Scenes
public void SendTerseUpdateToAgentClient(ScenePresence p)
{
// messy checks because a client doesn't know what presence it belongs too
IClientAPI remoteClient = p.ControllingClient;
if (remoteClient == null)
return;
if (!remoteClient.IsActive)
return;
if (ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID && p.GodLevel < 200)
return;
//m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity);
remoteClient.SendEntityUpdate(
this,