From dde2ac254497053bb7ec8e5f1757ddf13e5ea033 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 26 Aug 2014 02:22:25 +0100 Subject: still testing --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 56 ++++++++++++------------ 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 9fe3a9e..2b1b342 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1887,29 +1887,26 @@ namespace OpenSim.Region.Framework.Scenes m_log.DebugFormat( "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); - // Resume scripts this possible should also be moved down after sending the avatar to viewer ? - foreach (SceneObjectGroup sog in m_attachments) + foreach(SceneObjectGroup sog in m_attachments) { - SendFullUpdateToClient(ControllingClient); - SendAttachmentFullUpdateToAgentNF(sog, this); + sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); + sog.ResumeScripts(); + } - if (!sog.HasPrivateAttachmentPoint) + foreach (ScenePresence p in allpresences) + { + if (p == this) { - // sog.ScheduleGroupForFullUpdate(); - foreach(ScenePresence p in allpresences) - { - if (p == this) - continue; + SendTerseUpdateToAgentNF(this); + SendAttachmentsToAgentNF(this); + continue; + } - if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) - continue; + if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) + continue; - SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path - SendAttachmentFullUpdateToAgentNF(sog, p); - }; - } - sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); - sog.ResumeScripts(); + SendTerseUpdateToAgentNF(p); + SendAttachmentsToAgentNF(p); } } } @@ -3428,7 +3425,9 @@ namespace OpenSim.Region.Framework.Scenes if (remoteClient.IsActive) { //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity); - remoteClient.SendEntityUpdate(this, PrimUpdateFlags.FullUpdate); + remoteClient.SendEntityUpdate(this, + PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity + | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); m_scene.StatsReporter.AddAgentUpdates(1); } } @@ -4761,8 +4760,8 @@ namespace OpenSim.Region.Framework.Scenes if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) return; + SendTerseUpdateToAgentNF(p); SendAttachmentFullUpdateToAgentNF(sog, p); - SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path }); } } @@ -4772,13 +4771,13 @@ namespace OpenSim.Region.Framework.Scenes // for now they are checked in several places down the line... public void SendAttachmentsToAgentNF(ScenePresence p) { + SendTerseUpdateToAgentNF(p); lock (m_attachments) { foreach (SceneObjectGroup sog in m_attachments) { SendAttachmentFullUpdateToAgentNF(sog, p); - } - SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path + } } } @@ -5966,7 +5965,7 @@ namespace OpenSim.Region.Framework.Scenes public void HasMovedAway() { List allpresences = m_scene.GetScenePresences(); - /* foreach (ScenePresence p in allpresences) + foreach (ScenePresence p in allpresences) { if (p == this) continue; @@ -5974,19 +5973,20 @@ namespace OpenSim.Region.Framework.Scenes if (!p.IsChildAgent) p.SendKillTo(this); } - */ + if (Scene.AttachmentsModule != null) Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); } + // kill with attachs root kills public void SendKillTo(ScenePresence p) { List ids = new List(m_attachments.Count + 1); -// foreach (SceneObjectGroup sog in m_attachments) -// { -// ids.Add(sog.RootPart.LocalId); -// } + foreach (SceneObjectGroup sog in m_attachments) + { + ids.Add(sog.RootPart.LocalId); + } ids.Add(LocalId); p.ControllingClient.SendKillObject(ids); -- cgit v1.1