From b32b104996289b3e28c179b992cb5f44b6d1327a Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sun, 24 Mar 2019 16:15:24 +0000
Subject: some more changes on objects sending
---
OpenSim/Framework/ISceneAgent.cs | 8 ---
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 27 ++++++--
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 79 +++-------------------
3 files changed, 28 insertions(+), 86 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/ISceneAgent.cs b/OpenSim/Framework/ISceneAgent.cs
index 5d70b83..43e1b08 100644
--- a/OpenSim/Framework/ISceneAgent.cs
+++ b/OpenSim/Framework/ISceneAgent.cs
@@ -70,14 +70,6 @@ namespace OpenSim.Framework
AvatarAppearance Appearance { get; set; }
///
- /// Send initial scene data to the client controlling this agent
- ///
- ///
- /// This includes scene object data and the appearance data of other avatars.
- ///
- void SendInitialDataToMe();
-
- ///
/// Direction in which the scene presence is looking.
///
/// Will be Vector3.Zero for a child agent.
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 2b288df..601de61 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -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;
}
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e35481f..9a879f7 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -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;
-
- });
- }
-
///
/// Send avatar full data appearance and animations for all other root agents to this agent, this agent
/// can be either a child or root
--
cgit v1.1