sop SendFullUpdate() goes by presence if it is a attachment

avinationmerge
UbitUmarov 2014-08-22 21:54:00 +01:00
parent 0295e6822d
commit 1aa335078a
2 changed files with 39 additions and 8 deletions

View File

@ -3237,7 +3237,19 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId); // "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId);
if (ParentGroup.IsAttachment)
{
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
if (sp != null)
{
sp.SendAttachmentUpdate(this, UpdateRequired.FULL);
}
}
/* this does nothing
SendFullUpdateToClient(remoteClient, Position) ignores position parameter
if (IsRoot) if (IsRoot)
{ {
if (ParentGroup.IsAttachment) if (ParentGroup.IsAttachment)
@ -3249,6 +3261,7 @@ namespace OpenSim.Region.Framework.Scenes
SendFullUpdateToClient(remoteClient, AbsolutePosition); SendFullUpdateToClient(remoteClient, AbsolutePosition);
} }
} }
*/
else else
{ {
SendFullUpdateToClient(remoteClient); SendFullUpdateToClient(remoteClient);

View File

@ -1891,7 +1891,7 @@ namespace OpenSim.Region.Framework.Scenes
foreach (SceneObjectGroup sog in m_attachments) foreach (SceneObjectGroup sog in m_attachments)
{ {
SendFullUpdateToClient(ControllingClient); SendFullUpdateToClient(ControllingClient);
sog.SendFullUpdateToClient(ControllingClient); SendAttachmentFullUpdateToAgentNF(sog, this);
if (!sog.HasPrivateAttachmentPoint) if (!sog.HasPrivateAttachmentPoint)
{ {
@ -1905,7 +1905,7 @@ namespace OpenSim.Region.Framework.Scenes
continue; continue;
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
sog.SendFullUpdateToClient(p.ControllingClient); SendAttachmentFullUpdateToAgentNF(sog, p);
}; };
} }
sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
@ -4745,9 +4745,11 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (p != this && sog.HasPrivateAttachmentPoint) if (p != this && sog.HasPrivateAttachmentPoint)
return; return;
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
return; return;
sog.SendFullUpdateToClient(p.ControllingClient);
SendAttachmentFullUpdateToAgentNF(sog, p);
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
}); });
} }
@ -4762,15 +4764,31 @@ namespace OpenSim.Region.Framework.Scenes
{ {
foreach (SceneObjectGroup sog in m_attachments) foreach (SceneObjectGroup sog in m_attachments)
{ {
if (p == this || !sog.HasPrivateAttachmentPoint) SendAttachmentFullUpdateToAgentNF(sog, p);
{
sog.SendFullUpdateToClient(p.ControllingClient);
}
} }
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
} }
} }
public void SendAttachmentFullUpdateToAgentNF(SceneObjectGroup sog, ScenePresence p)
{
if (p != this && sog.HasPrivateAttachmentPoint)
return;
SceneObjectPart[] parts = sog.Parts;
SceneObjectPart rootpart = sog.RootPart;
p.ControllingClient.SendEntityUpdate(rootpart, PrimUpdateFlags.FullUpdate);
for (int i = 0; i < parts.Length; i++)
{
SceneObjectPart part = parts[i];
if (part == rootpart)
continue;
p.ControllingClient.SendEntityUpdate(part, PrimUpdateFlags.FullUpdate);
}
}
public void SendAttachmentScheduleUpdate(SceneObjectGroup sog) public void SendAttachmentScheduleUpdate(SceneObjectGroup sog)
{ {
if (IsChildAgent || IsInTransit) if (IsChildAgent || IsInTransit)