aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2014-08-20 17:48:10 +0100
committerUbitUmarov2014-08-20 17:48:10 +0100
commitb21b6532b07a7a5b50e62de2f9b074c768a14e74 (patch)
tree812d398f76e5b4ebfee54bdf2e9d7ad024fec35b
parent also send attachment pre-kills on crossings (diff)
downloadopensim-SC_OLD-b21b6532b07a7a5b50e62de2f9b074c768a14e74.zip
opensim-SC_OLD-b21b6532b07a7a5b50e62de2f9b074c768a14e74.tar.gz
opensim-SC_OLD-b21b6532b07a7a5b50e62de2f9b074c768a14e74.tar.bz2
opensim-SC_OLD-b21b6532b07a7a5b50e62de2f9b074c768a14e74.tar.xz
sending attachment kills before putting them back doesnt cover all cases
and seems heavy for viewers
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs45
1 files changed, 21 insertions, 24 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index a0c3ba9..864f54d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1878,7 +1878,6 @@ namespace OpenSim.Region.Framework.Scenes
1878 if (!IsChildAgent) 1878 if (!IsChildAgent)
1879 { 1879 {
1880 1880
1881
1882 ValidateAndSendAppearanceAndAgentData(); 1881 ValidateAndSendAppearanceAndAgentData();
1883 1882
1884 m_log.DebugFormat("[CompleteMovement] ValidateAndSendAppearanceAndAgentData: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 1883 m_log.DebugFormat("[CompleteMovement] ValidateAndSendAppearanceAndAgentData: {0}ms", Util.EnvironmentTickCountSubtract(ts));
@@ -1900,35 +1899,30 @@ namespace OpenSim.Region.Framework.Scenes
1900 m_log.DebugFormat( 1899 m_log.DebugFormat(
1901 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); 1900 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
1902 1901
1903 List<uint> kk = new List<uint>();
1904
1905 // Resume scripts this possible should also be moved down after sending the avatar to viewer ? 1902 // Resume scripts this possible should also be moved down after sending the avatar to viewer ?
1906 foreach (SceneObjectGroup sog in m_attachments) 1903 foreach (SceneObjectGroup sog in m_attachments)
1907 { 1904 {
1908 foreach (SceneObjectPart part in sog.Parts)
1909 kk.Add(part.LocalId);
1910
1911 sog.SendFullUpdateToClient(ControllingClient); 1905 sog.SendFullUpdateToClient(ControllingClient);
1912 SendFullUpdateToClient(ControllingClient); 1906 SendFullUpdateToClient(ControllingClient);
1913 1907
1914 // sog.ScheduleGroupForFullUpdate(); 1908 if (!sog.HasPrivateAttachmentPoint)
1915 m_scene.ForEachScenePresence(delegate(ScenePresence p)
1916 { 1909 {
1917 if (p == this) 1910 // sog.ScheduleGroupForFullUpdate();
1918 return; 1911 m_scene.ForEachScenePresence(delegate(ScenePresence p)
1919 if (sog.HasPrivateAttachmentPoint) 1912 {
1920 return; 1913 if (p == this)
1921 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) 1914 return;
1922 return; 1915
1923 1916 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
1924 p.ControllingClient.SendKillObject(kk); 1917 return;
1925 sog.SendFullUpdateToClient(p.ControllingClient); 1918
1926 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path 1919 sog.SendFullUpdateToClient(p.ControllingClient);
1927 }); 1920 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
1928 1921 });
1922 }
1923
1929 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); 1924 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
1930 sog.ResumeScripts(); 1925 sog.ResumeScripts();
1931 kk.Clear();
1932 } 1926 }
1933 } 1927 }
1934 } 1928 }
@@ -4758,6 +4752,9 @@ namespace OpenSim.Region.Framework.Scenes
4758 } 4752 }
4759 } 4753 }
4760 4754
4755 // send attachments to a client without filters except for huds
4756 // for now they are checked in several places down the line...
4757 // kills all parts before sending
4761 public void SendAttachmentsToAgentNFPK(ScenePresence p) 4758 public void SendAttachmentsToAgentNFPK(ScenePresence p)
4762 { 4759 {
4763 lock (m_attachments) 4760 lock (m_attachments)
@@ -5680,7 +5677,7 @@ namespace OpenSim.Region.Framework.Scenes
5680 p.SendAppearanceToAgent(this); 5677 p.SendAppearanceToAgent(this);
5681 if (p.Animator != null) 5678 if (p.Animator != null)
5682 p.Animator.SendAnimPackToClient(ControllingClient); 5679 p.Animator.SendAnimPackToClient(ControllingClient);
5683 p.SendAttachmentsToAgentNFPK(this); 5680 p.SendAttachmentsToAgentNF(this);
5684 } 5681 }
5685 } 5682 }
5686 } 5683 }
@@ -5995,7 +5992,7 @@ namespace OpenSim.Region.Framework.Scenes
5995 SendAppearanceToAgent(p); 5992 SendAppearanceToAgent(p);
5996 if (Animator != null) 5993 if (Animator != null)
5997 Animator.SendAnimPackToClient(p.ControllingClient); 5994 Animator.SendAnimPackToClient(p.ControllingClient);
5998 SendAttachmentsToAgentNFPK(p); 5995 SendAttachmentsToAgentNF(p);
5999 } 5996 }
6000 } 5997 }
6001 5998
@@ -6011,7 +6008,7 @@ namespace OpenSim.Region.Framework.Scenes
6011 p.SendAppearanceToAgent(this); 6008 p.SendAppearanceToAgent(this);
6012 if (p.Animator != null) 6009 if (p.Animator != null)
6013 p.Animator.SendAnimPackToClient(ControllingClient); 6010 p.Animator.SendAnimPackToClient(ControllingClient);
6014 p.SendAttachmentsToAgentNFPK(this); 6011 p.SendAttachmentsToAgentNF(this);
6015 } 6012 }
6016 } 6013 }
6017 } 6014 }