some more changes on objects sending
parent
481d7156d1
commit
b32b104996
|
@ -70,14 +70,6 @@ namespace OpenSim.Framework
|
||||||
AvatarAppearance Appearance { get; set; }
|
AvatarAppearance Appearance { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <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.
|
/// Direction in which the scene presence is looking.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Will be Vector3.Zero for a child agent.</remarks>
|
/// <remarks>Will be Vector3.Zero for a child agent.</remarks>
|
||||||
|
|
|
@ -5544,17 +5544,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if(GroupsNeedFullUpdate.Count > 0)
|
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;
|
||||||
foreach (SceneObjectGroup grp in GroupsNeedFullUpdate)
|
|
||||||
|
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;
|
PrimUpdateFlags flags = PrimUpdateFlags.CancelKill;
|
||||||
if (viewerCache && grp.IsViewerCachable)
|
foreach (SceneObjectGroup grp in GroupsNeedFullUpdate)
|
||||||
flags |= PrimUpdateFlags.UpdateProbe;
|
{
|
||||||
foreach (SceneObjectPart p in grp.Parts)
|
foreach (SceneObjectPart p in grp.Parts)
|
||||||
SendEntityUpdate(p, flags);
|
SendEntityUpdate(p, flags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckGroupsInViewBusy = false;
|
CheckGroupsInViewBusy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1214,7 +1214,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ControllingClient.OnUpdateThrottles += RaiseUpdateThrottles;
|
ControllingClient.OnUpdateThrottles += RaiseUpdateThrottles;
|
||||||
ControllingClient.OnRegionHandShakeReply += RegionHandShakeReply;
|
ControllingClient.OnRegionHandShakeReply += RegionHandShakeReply;
|
||||||
|
|
||||||
// ControllingClient.OnAgentFOV += HandleAgentFOV;
|
// ControllingClient.OnAgentFOV += HandleAgentFOV;
|
||||||
|
|
||||||
// ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
|
// ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
|
||||||
// ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
|
// ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
|
||||||
|
@ -4022,12 +4022,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ControllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations);
|
ControllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void RegionHandShakeReply (IClientAPI client, uint flags)
|
public void RegionHandShakeReply (IClientAPI client, uint flags)
|
||||||
{
|
{
|
||||||
if(IsNPC)
|
if(IsNPC)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
lock (m_completeMovementLock)
|
||||||
|
{
|
||||||
|
if (SentInitialData)
|
||||||
|
return;
|
||||||
|
SentInitialData = true;
|
||||||
|
}
|
||||||
|
|
||||||
bool selfappearance = (flags & 4) != 0;
|
bool selfappearance = (flags & 4) != 0;
|
||||||
bool cacheCulling = (flags & 1) != 0;
|
bool cacheCulling = (flags & 1) != 0;
|
||||||
bool cacheEmpty;
|
bool cacheEmpty;
|
||||||
|
@ -4036,16 +4042,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else
|
else
|
||||||
cacheEmpty = true;
|
cacheEmpty = true;
|
||||||
|
|
||||||
// if (m_teleportFlags > 0) // only doing for child for now
|
|
||||||
// return;
|
|
||||||
|
|
||||||
lock (m_completeMovementLock)
|
|
||||||
{
|
|
||||||
if (SentInitialData)
|
|
||||||
return;
|
|
||||||
SentInitialData = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Util.FireAndForget(delegate
|
Util.FireAndForget(delegate
|
||||||
{
|
{
|
||||||
if (m_teleportFlags <= 0)
|
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>
|
/// <summary>
|
||||||
/// Send avatar full data appearance and animations for all other root agents to this agent, this agent
|
/// Send avatar full data appearance and animations for all other root agents to this agent, this agent
|
||||||
/// can be either a child or root
|
/// can be either a child or root
|
||||||
|
|
Loading…
Reference in New Issue