aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2014-08-26 02:22:25 +0100
committerUbitUmarov2014-08-26 02:22:25 +0100
commitdde2ac254497053bb7ec8e5f1757ddf13e5ea033 (patch)
tree5f8b5ec747f8a4dcd85224b5741c152f330c41d3 /OpenSim
parent even less kills on tps (diff)
downloadopensim-SC_OLD-dde2ac254497053bb7ec8e5f1757ddf13e5ea033.zip
opensim-SC_OLD-dde2ac254497053bb7ec8e5f1757ddf13e5ea033.tar.gz
opensim-SC_OLD-dde2ac254497053bb7ec8e5f1757ddf13e5ea033.tar.bz2
opensim-SC_OLD-dde2ac254497053bb7ec8e5f1757ddf13e5ea033.tar.xz
still testing
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs56
1 files changed, 28 insertions, 28 deletions
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
1887 m_log.DebugFormat( 1887 m_log.DebugFormat(
1888 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); 1888 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
1889 1889
1890 // Resume scripts this possible should also be moved down after sending the avatar to viewer ? 1890 foreach(SceneObjectGroup sog in m_attachments)
1891 foreach (SceneObjectGroup sog in m_attachments)
1892 { 1891 {
1893 SendFullUpdateToClient(ControllingClient); 1892 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
1894 SendAttachmentFullUpdateToAgentNF(sog, this); 1893 sog.ResumeScripts();
1894 }
1895 1895
1896 if (!sog.HasPrivateAttachmentPoint) 1896 foreach (ScenePresence p in allpresences)
1897 {
1898 if (p == this)
1897 { 1899 {
1898 // sog.ScheduleGroupForFullUpdate(); 1900 SendTerseUpdateToAgentNF(this);
1899 foreach(ScenePresence p in allpresences) 1901 SendAttachmentsToAgentNF(this);
1900 { 1902 continue;
1901 if (p == this) 1903 }
1902 continue;
1903 1904
1904 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) 1905 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
1905 continue; 1906 continue;
1906 1907
1907 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path 1908 SendTerseUpdateToAgentNF(p);
1908 SendAttachmentFullUpdateToAgentNF(sog, p); 1909 SendAttachmentsToAgentNF(p);
1909 };
1910 }
1911 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
1912 sog.ResumeScripts();
1913 } 1910 }
1914 } 1911 }
1915 } 1912 }
@@ -3428,7 +3425,9 @@ namespace OpenSim.Region.Framework.Scenes
3428 if (remoteClient.IsActive) 3425 if (remoteClient.IsActive)
3429 { 3426 {
3430 //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity); 3427 //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity);
3431 remoteClient.SendEntityUpdate(this, PrimUpdateFlags.FullUpdate); 3428 remoteClient.SendEntityUpdate(this,
3429 PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
3430 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
3432 m_scene.StatsReporter.AddAgentUpdates(1); 3431 m_scene.StatsReporter.AddAgentUpdates(1);
3433 } 3432 }
3434 } 3433 }
@@ -4761,8 +4760,8 @@ namespace OpenSim.Region.Framework.Scenes
4761 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) 4760 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
4762 return; 4761 return;
4763 4762
4763 SendTerseUpdateToAgentNF(p);
4764 SendAttachmentFullUpdateToAgentNF(sog, p); 4764 SendAttachmentFullUpdateToAgentNF(sog, p);
4765 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
4766 }); 4765 });
4767 } 4766 }
4768 } 4767 }
@@ -4772,13 +4771,13 @@ namespace OpenSim.Region.Framework.Scenes
4772 // for now they are checked in several places down the line... 4771 // for now they are checked in several places down the line...
4773 public void SendAttachmentsToAgentNF(ScenePresence p) 4772 public void SendAttachmentsToAgentNF(ScenePresence p)
4774 { 4773 {
4774 SendTerseUpdateToAgentNF(p);
4775 lock (m_attachments) 4775 lock (m_attachments)
4776 { 4776 {
4777 foreach (SceneObjectGroup sog in m_attachments) 4777 foreach (SceneObjectGroup sog in m_attachments)
4778 { 4778 {
4779 SendAttachmentFullUpdateToAgentNF(sog, p); 4779 SendAttachmentFullUpdateToAgentNF(sog, p);
4780 } 4780 }
4781 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
4782 } 4781 }
4783 } 4782 }
4784 4783
@@ -5966,7 +5965,7 @@ namespace OpenSim.Region.Framework.Scenes
5966 public void HasMovedAway() 5965 public void HasMovedAway()
5967 { 5966 {
5968 List<ScenePresence> allpresences = m_scene.GetScenePresences(); 5967 List<ScenePresence> allpresences = m_scene.GetScenePresences();
5969 /* foreach (ScenePresence p in allpresences) 5968 foreach (ScenePresence p in allpresences)
5970 { 5969 {
5971 if (p == this) 5970 if (p == this)
5972 continue; 5971 continue;
@@ -5974,19 +5973,20 @@ namespace OpenSim.Region.Framework.Scenes
5974 if (!p.IsChildAgent) 5973 if (!p.IsChildAgent)
5975 p.SendKillTo(this); 5974 p.SendKillTo(this);
5976 } 5975 }
5977 */ 5976
5978 if (Scene.AttachmentsModule != null) 5977 if (Scene.AttachmentsModule != null)
5979 Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); 5978 Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true);
5980 } 5979 }
5981 5980
5981
5982// kill with attachs root kills 5982// kill with attachs root kills
5983 public void SendKillTo(ScenePresence p) 5983 public void SendKillTo(ScenePresence p)
5984 { 5984 {
5985 List<uint> ids = new List<uint>(m_attachments.Count + 1); 5985 List<uint> ids = new List<uint>(m_attachments.Count + 1);
5986// foreach (SceneObjectGroup sog in m_attachments) 5986 foreach (SceneObjectGroup sog in m_attachments)
5987// { 5987 {
5988// ids.Add(sog.RootPart.LocalId); 5988 ids.Add(sog.RootPart.LocalId);
5989// } 5989 }
5990 5990
5991 ids.Add(LocalId); 5991 ids.Add(LocalId);
5992 p.ControllingClient.SendKillObject(ids); 5992 p.ControllingClient.SendKillObject(ids);