add a direct sendpartfullUpdate to send a full object update to a part,

optionally overriding its parentID. check what it does to attachments
avinationmerge
UbitUmarov 2014-08-21 00:49:10 +01:00
parent ea1c232f92
commit 5bf145a397
6 changed files with 43 additions and 0 deletions

View File

@ -1116,6 +1116,8 @@ namespace OpenSim.Framework
/// <param name="localID"></param>
void SendKillObject(List<uint> localID);
void SendPartFullUpdate(ISceneEntity ent, uint? parentID);
void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs);
void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args);

View File

@ -4208,7 +4208,33 @@ 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()

View File

@ -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,8 +4747,11 @@ 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
}
}

View File

@ -1702,5 +1702,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
{
}
public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
{
}
}
}

View File

@ -1272,5 +1272,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{
}
public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
{
}
}
}

View File

@ -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)
{
}