some more changes on objects sending
parent
481d7156d1
commit
b32b104996
|
@ -70,14 +70,6 @@ namespace OpenSim.Framework
|
|||
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>
|
||||
/// <remarks>Will be Vector3.Zero for a child agent.</remarks>
|
||||
|
|
|
@ -5544,17 +5544,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
if(GroupsNeedFullUpdate.Count > 0)
|
||||
{
|
||||
bool viewerCache = m_supportViewerCache && (m_viewerHandShakeFlags & 1) != 0;// && mysp.IsChildAgent;
|
||||
foreach (SceneObjectGroup grp in GroupsNeedFullUpdate)
|
||||
bool sendProbes = m_supportViewerCache && (m_viewerHandShakeFlags & 1) != 0 && (m_viewerHandShakeFlags & 2) == 0;
|
||||
|
||||
if(sendProbes)
|
||||
{
|
||||
foreach (SceneObjectGroup grp in GroupsNeedFullUpdate)
|
||||
{
|
||||
PrimUpdateFlags flags = PrimUpdateFlags.CancelKill;
|
||||
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;
|
||||
if (viewerCache && grp.IsViewerCachable)
|
||||
flags |= PrimUpdateFlags.UpdateProbe;
|
||||
foreach (SceneObjectPart p in grp.Parts)
|
||||
SendEntityUpdate(p, flags);
|
||||
foreach (SceneObjectGroup grp in GroupsNeedFullUpdate)
|
||||
{
|
||||
foreach (SceneObjectPart p in grp.Parts)
|
||||
SendEntityUpdate(p, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckGroupsInViewBusy = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1214,7 +1214,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
ControllingClient.OnUpdateThrottles += RaiseUpdateThrottles;
|
||||
ControllingClient.OnRegionHandShakeReply += RegionHandShakeReply;
|
||||
|
||||
// ControllingClient.OnAgentFOV += HandleAgentFOV;
|
||||
// ControllingClient.OnAgentFOV += HandleAgentFOV;
|
||||
|
||||
// ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
|
||||
// ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
|
||||
|
@ -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