also send attachment pre-kills on crossings

avinationmerge
UbitUmarov 2014-08-19 20:33:26 +01:00
parent 6aa60a5d97
commit d16f7df673
1 changed files with 14 additions and 1 deletions

View File

@ -1900,22 +1900,35 @@ namespace OpenSim.Region.Framework.Scenes
m_log.DebugFormat(
"[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
List<uint> kk = new List<uint>();
// Resume scripts this possible should also be moved down after sending the avatar to viewer ?
foreach (SceneObjectGroup sog in m_attachments)
{
foreach (SceneObjectPart part in sog.Parts)
kk.Add(part.LocalId);
sog.SendFullUpdateToClient(ControllingClient);
SendFullUpdateToClient(ControllingClient);
// sog.ScheduleGroupForFullUpdate();
m_scene.ForEachScenePresence(delegate(ScenePresence p)
{
if (p != this && sog.HasPrivateAttachmentPoint)
if (p == this)
return;
if (sog.HasPrivateAttachmentPoint)
return;
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
return;
p.ControllingClient.SendKillObject(kk);
sog.SendFullUpdateToClient(p.ControllingClient);
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
});
sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
sog.ResumeScripts();
kk.Clear();
}
}
}