From 5bf145a3977a55c474106bbe2a6c107dd9457f0d Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Thu, 21 Aug 2014 00:49:10 +0100
Subject: add a direct sendpartfullUpdate to send a full object update to a
part, optionally overriding its parentID. check what it does to attachments
---
OpenSim/Framework/IClientAPI.cs | 2 ++
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 26 ++++++++++++++++++++++
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++++
.../Server/IRCClientView.cs | 3 +++
.../Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++++
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
6 files changed, 43 insertions(+)
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 3b0430b..d73802e 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1116,6 +1116,8 @@ namespace OpenSim.Framework
///
void SendKillObject(List localID);
+ void SendPartFullUpdate(ISceneEntity ent, uint? parentID);
+
void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs);
void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args);
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 475cfe2..06f1301 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -4208,9 +4208,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task, true);
}
+
+
#endregion Packet Sending
+
}
+ // hack.. dont use
+ public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
+ {
+ if (ent is SceneObjectPart)
+ {
+ SceneObjectPart part = (SceneObjectPart)ent;
+ ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
+ packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
+ packet.RegionData.TimeDilation = 1;
+ packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
+
+ ObjectUpdatePacket.ObjectDataBlock blk = CreatePrimUpdateBlock(part, this.m_agentId);
+ if (parentID.HasValue)
+ {
+ blk.ParentID = parentID.Value;
+ }
+
+ packet.ObjectData[0] = blk;
+
+ OutPacket(packet, ThrottleOutPacketType.Task, true);
+ }
+ }
+
public void ReprioritizeUpdates()
{
lock (m_entityUpdates.SyncRoot)
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5ebf3db..73283ed 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1916,6 +1916,7 @@ namespace OpenSim.Region.Framework.Scenes
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
return;
+ p.ControllingClient.SendPartFullUpdate(sog.RootPart,LocalId + 1);
sog.SendFullUpdateToClient(p.ControllingClient);
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
});
@@ -4746,7 +4747,10 @@ namespace OpenSim.Region.Framework.Scenes
foreach (SceneObjectGroup sog in m_attachments)
{
if (p == this || !sog.HasPrivateAttachmentPoint)
+ {
+ p.ControllingClient.SendPartFullUpdate(sog.RootPart, LocalId + 1);
sog.SendFullUpdateToClient(p.ControllingClient);
+ }
}
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
}
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index f35ea92..2112b71 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1702,5 +1702,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
{
}
+ public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
+ {
+ }
}
}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 7002d75..fa1d38a 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -1272,5 +1272,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{
}
+ public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
+ {
+ }
+
}
}
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index f3eaed3..2758030 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -536,6 +536,10 @@ namespace OpenSim.Tests.Common.Mock
ReceivedKills.AddRange(localID);
}
+ public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
+ {
+ }
+
public virtual void SetChildAgentThrottle(byte[] throttle)
{
}
--
cgit v1.1