diff options
author | Melanie Thielker | 2014-08-27 11:25:17 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-08-27 11:25:17 +0200 |
commit | 012d0b07bc797db3d230337745bb543c33800855 (patch) | |
tree | 08e688f166939f459ffe3aca371c09a0fa6c126b /OpenSim/Region/Framework | |
parent | Merge branch 'ubitworkmaster' (diff) | |
parent | enqueue also if m_nextPackets[category] is not null. This is really the (diff) | |
download | opensim-SC-012d0b07bc797db3d230337745bb543c33800855.zip opensim-SC-012d0b07bc797db3d230337745bb543c33800855.tar.gz opensim-SC-012d0b07bc797db3d230337745bb543c33800855.tar.bz2 opensim-SC-012d0b07bc797db3d230337745bb543c33800855.tar.xz |
Merge branch 'ubitworkmaster'
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 89 |
1 files changed, 57 insertions, 32 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4fa95fd..5868251 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 | ||
@@ -5963,21 +5962,47 @@ namespace OpenSim.Region.Framework.Scenes | |||
5963 | } | 5962 | } |
5964 | } | 5963 | } |
5965 | 5964 | ||
5966 | public void HasMovedAway() | 5965 | public void HasMovedAway(bool nearRegion) |
5967 | { | 5966 | { |
5968 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | 5967 | |
5969 | foreach (ScenePresence p in allpresences) | 5968 | if (nearRegion) |
5970 | { | 5969 | { |
5971 | if (p == this) | 5970 | if (Scene.AttachmentsModule != null) |
5972 | continue; | 5971 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); |
5973 | SendKillTo(p); | 5972 | |
5974 | if (!p.IsChildAgent) | 5973 | if (!ParcelHideThisAvatar || GodLevel >= 200) |
5975 | p.SendKillTo(this); | 5974 | return; |
5975 | |||
5976 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | ||
5977 | foreach (ScenePresence p in allpresences) | ||
5978 | { | ||
5979 | if (p.IsDeleted || p == this || p.IsChildAgent || p.ControllingClient == null || !p.ControllingClient.IsActive) | ||
5980 | continue; | ||
5981 | |||
5982 | if (p.currentParcelUUID == m_currentParcelUUID) | ||
5983 | { | ||
5984 | p.SendKillTo(this); | ||
5985 | } | ||
5986 | } | ||
5987 | } | ||
5988 | else | ||
5989 | { | ||
5990 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | ||
5991 | foreach (ScenePresence p in allpresences) | ||
5992 | { | ||
5993 | if (p == this) | ||
5994 | continue; | ||
5995 | SendKillTo(p); | ||
5996 | if (!p.IsChildAgent) | ||
5997 | p.SendKillTo(this); | ||
5998 | } | ||
5999 | |||
6000 | if (Scene.AttachmentsModule != null) | ||
6001 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); | ||
5976 | } | 6002 | } |
5977 | if (Scene.AttachmentsModule != null) | ||
5978 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); | ||
5979 | } | 6003 | } |
5980 | 6004 | ||
6005 | |||
5981 | // kill with attachs root kills | 6006 | // kill with attachs root kills |
5982 | public void SendKillTo(ScenePresence p) | 6007 | public void SendKillTo(ScenePresence p) |
5983 | { | 6008 | { |