some more changes on objects sending
parent
481d7156d1
commit
b32b104996
|
@ -69,14 +69,6 @@ namespace OpenSim.Framework
|
|||
/// </remarks>
|
||||
AvatarAppearance Appearance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Send initial scene data to the client controlling this agent
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This includes scene object data and the appearance data of other avatars.
|
||||
/// </remarks>
|
||||
void SendInitialDataToMe();
|
||||
|
||||
/// <summary>
|
||||
/// Direction in which the scene presence is looking.
|
||||
/// </summary>
|
||||
|
|
|
@ -5544,17 +5544,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
if(GroupsNeedFullUpdate.Count > 0)
|
||||
{
|
||||
bool viewerCache = m_supportViewerCache && (m_viewerHandShakeFlags & 1) != 0;// && mysp.IsChildAgent;
|
||||
bool sendProbes = m_supportViewerCache && (m_viewerHandShakeFlags & 1) != 0 && (m_viewerHandShakeFlags & 2) == 0;
|
||||
|
||||
if(sendProbes)
|
||||
{
|
||||
foreach (SceneObjectGroup grp in GroupsNeedFullUpdate)
|
||||
{
|
||||
PrimUpdateFlags flags = PrimUpdateFlags.CancelKill;
|
||||
if (viewerCache && grp.IsViewerCachable)
|
||||
if (grp.IsViewerCachable)
|
||||
flags |= PrimUpdateFlags.UpdateProbe;
|
||||
foreach (SceneObjectPart p in grp.Parts)
|
||||
SendEntityUpdate(p, flags);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
m_viewerHandShakeFlags &= ~2U; // nexttime send probes
|
||||
PrimUpdateFlags flags = PrimUpdateFlags.CancelKill;
|
||||
foreach (SceneObjectGroup grp in GroupsNeedFullUpdate)
|
||||
{
|
||||
foreach (SceneObjectPart p in grp.Parts)
|
||||
SendEntityUpdate(p, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
CheckGroupsInViewBusy = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4022,12 +4022,18 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
ControllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations);
|
||||
}
|
||||
|
||||
|
||||
public void RegionHandShakeReply (IClientAPI client, uint flags)
|
||||
{
|
||||
if(IsNPC)
|
||||
return;
|
||||
|
||||
lock (m_completeMovementLock)
|
||||
{
|
||||
if (SentInitialData)
|
||||
return;
|
||||
SentInitialData = true;
|
||||
}
|
||||
|
||||
bool selfappearance = (flags & 4) != 0;
|
||||
bool cacheCulling = (flags & 1) != 0;
|
||||
bool cacheEmpty;
|
||||
|
@ -4036,16 +4042,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
else
|
||||
cacheEmpty = true;
|
||||
|
||||
// if (m_teleportFlags > 0) // only doing for child for now
|
||||
// return;
|
||||
|
||||
lock (m_completeMovementLock)
|
||||
{
|
||||
if (SentInitialData)
|
||||
return;
|
||||
SentInitialData = true;
|
||||
}
|
||||
|
||||
Util.FireAndForget(delegate
|
||||
{
|
||||
if (m_teleportFlags <= 0)
|
||||
|
@ -4108,65 +4104,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
}
|
||||
|
||||
public void SendInitialDataToMe()
|
||||
{
|
||||
// Send all scene object to the new client
|
||||
lock (m_completeMovementLock)
|
||||
{
|
||||
if (SentInitialData)
|
||||
return;
|
||||
SentInitialData = true;
|
||||
}
|
||||
|
||||
Util.FireAndForget(delegate
|
||||
{
|
||||
// we created a new ScenePresence (a new child agent) in a fresh region.
|
||||
// Request info about all the (root) agents in this region
|
||||
// Note: This won't send data *to* other clients in that region (children don't send)
|
||||
if (m_teleportFlags <= 0)
|
||||
{
|
||||
Scene.SendLayerData(ControllingClient);
|
||||
|
||||
ILandChannel landch = m_scene.LandChannel;
|
||||
if (landch != null)
|
||||
{
|
||||
landch.sendClientInitialLandInfo(ControllingClient, true);
|
||||
}
|
||||
}
|
||||
|
||||
// recheck to reduce timing issues
|
||||
ControllingClient.CheckViewerCaps();
|
||||
|
||||
SendOtherAgentsAvatarFullToMe();
|
||||
|
||||
if(m_scene.ObjectsCullingByDistance)
|
||||
{
|
||||
m_reprioritizationBusy = true;
|
||||
m_reprioritizationLastPosition = AbsolutePosition;
|
||||
m_reprioritizationLastDrawDistance = DrawDistance;
|
||||
|
||||
ControllingClient.ReprioritizeUpdates();
|
||||
m_reprioritizationLastTime = Util.EnvironmentTickCount();
|
||||
m_reprioritizationBusy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
EntityBase[] entities = Scene.Entities.GetEntities();
|
||||
foreach (EntityBase e in entities)
|
||||
{
|
||||
if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment)
|
||||
((SceneObjectGroup)e).SendFullAnimUpdateToClient(ControllingClient);
|
||||
}
|
||||
|
||||
m_reprioritizationLastPosition = AbsolutePosition;
|
||||
m_reprioritizationLastDrawDistance = DrawDistance;
|
||||
m_reprioritizationLastTime = Util.EnvironmentTickCount() + 15000; // delay it
|
||||
|
||||
m_reprioritizationBusy = false;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send avatar full data appearance and animations for all other root agents to this agent, this agent
|
||||
/// can be either a child or root
|
||||
|
|
Loading…
Reference in New Issue