aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorMelanie Thielker2014-08-21 02:38:57 +0200
committerMelanie Thielker2014-08-21 02:38:57 +0200
commitf06f13b59dd7261bfdcee59b546431fe47dcc635 (patch)
tree81cdfa2c9d8064708a5d6e4543b5ba90a3513e41 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentMerge branch 'ubitworkmaster' (diff)
parentadd a direct sendpartfullUpdate to send a full object update to a part, (diff)
downloadopensim-SC-f06f13b59dd7261bfdcee59b546431fe47dcc635.zip
opensim-SC-f06f13b59dd7261bfdcee59b546431fe47dcc635.tar.gz
opensim-SC-f06f13b59dd7261bfdcee59b546431fe47dcc635.tar.bz2
opensim-SC-f06f13b59dd7261bfdcee59b546431fe47dcc635.tar.xz
Merge branch 'ubitworkmaster'
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs51
1 files changed, 26 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index a0c3ba9..73283ed 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -969,7 +969,7 @@ namespace OpenSim.Region.Framework.Scenes
969 m_name = String.Format("{0} {1}", Firstname, Lastname); 969 m_name = String.Format("{0} {1}", Firstname, Lastname);
970 m_scene = world; 970 m_scene = world;
971 m_uuid = client.AgentId; 971 m_uuid = client.AgentId;
972 LocalId = m_scene.AllocateLocalId(); 972 LocalId = m_scene.AllocatePresenceLocalId();
973 973
974 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid); 974 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
975 if (account != null) 975 if (account != null)
@@ -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,31 @@ 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 p.ControllingClient.SendPartFullUpdate(sog.RootPart,LocalId + 1);
1927 }); 1920 sog.SendFullUpdateToClient(p.ControllingClient);
1928 1921 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
1922 });
1923 }
1924
1929 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); 1925 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
1930 sog.ResumeScripts(); 1926 sog.ResumeScripts();
1931 kk.Clear();
1932 } 1927 }
1933 } 1928 }
1934 } 1929 }
@@ -4752,12 +4747,18 @@ namespace OpenSim.Region.Framework.Scenes
4752 foreach (SceneObjectGroup sog in m_attachments) 4747 foreach (SceneObjectGroup sog in m_attachments)
4753 { 4748 {
4754 if (p == this || !sog.HasPrivateAttachmentPoint) 4749 if (p == this || !sog.HasPrivateAttachmentPoint)
4750 {
4751 p.ControllingClient.SendPartFullUpdate(sog.RootPart, LocalId + 1);
4755 sog.SendFullUpdateToClient(p.ControllingClient); 4752 sog.SendFullUpdateToClient(p.ControllingClient);
4753 }
4756 } 4754 }
4757 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path 4755 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
4758 } 4756 }
4759 } 4757 }
4760 4758
4759 // send attachments to a client without filters except for huds
4760 // for now they are checked in several places down the line...
4761 // kills all parts before sending
4761 public void SendAttachmentsToAgentNFPK(ScenePresence p) 4762 public void SendAttachmentsToAgentNFPK(ScenePresence p)
4762 { 4763 {
4763 lock (m_attachments) 4764 lock (m_attachments)
@@ -5680,7 +5681,7 @@ namespace OpenSim.Region.Framework.Scenes
5680 p.SendAppearanceToAgent(this); 5681 p.SendAppearanceToAgent(this);
5681 if (p.Animator != null) 5682 if (p.Animator != null)
5682 p.Animator.SendAnimPackToClient(ControllingClient); 5683 p.Animator.SendAnimPackToClient(ControllingClient);
5683 p.SendAttachmentsToAgentNFPK(this); 5684 p.SendAttachmentsToAgentNF(this);
5684 } 5685 }
5685 } 5686 }
5686 } 5687 }
@@ -5995,7 +5996,7 @@ namespace OpenSim.Region.Framework.Scenes
5995 SendAppearanceToAgent(p); 5996 SendAppearanceToAgent(p);
5996 if (Animator != null) 5997 if (Animator != null)
5997 Animator.SendAnimPackToClient(p.ControllingClient); 5998 Animator.SendAnimPackToClient(p.ControllingClient);
5998 SendAttachmentsToAgentNFPK(p); 5999 SendAttachmentsToAgentNF(p);
5999 } 6000 }
6000 } 6001 }
6001 6002
@@ -6011,7 +6012,7 @@ namespace OpenSim.Region.Framework.Scenes
6011 p.SendAppearanceToAgent(this); 6012 p.SendAppearanceToAgent(this);
6012 if (p.Animator != null) 6013 if (p.Animator != null)
6013 p.Animator.SendAnimPackToClient(ControllingClient); 6014 p.Animator.SendAnimPackToClient(ControllingClient);
6014 p.SendAttachmentsToAgentNFPK(this); 6015 p.SendAttachmentsToAgentNF(this);
6015 } 6016 }
6016 } 6017 }
6017 } 6018 }