diff options
author | UbitUmarov | 2014-08-22 21:54:00 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-22 21:54:00 +0100 |
commit | 1aa335078a15b176215df963980fdb1141494324 (patch) | |
tree | 63a813025ecc3396991d3f99db8478466a52b44e /OpenSim/Region | |
parent | some cleanup ( well or not ) (diff) | |
download | opensim-SC_OLD-1aa335078a15b176215df963980fdb1141494324.zip opensim-SC_OLD-1aa335078a15b176215df963980fdb1141494324.tar.gz opensim-SC_OLD-1aa335078a15b176215df963980fdb1141494324.tar.bz2 opensim-SC_OLD-1aa335078a15b176215df963980fdb1141494324.tar.xz |
sop SendFullUpdate() goes by presence if it is a attachment
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 32 |
2 files changed, 39 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0930820..6fbe732 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -3237,7 +3237,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
3237 | 3237 | ||
3238 | // m_log.DebugFormat( | 3238 | // m_log.DebugFormat( |
3239 | // "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId); | 3239 | // "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId); |
3240 | 3240 | ||
3241 | |||
3242 | if (ParentGroup.IsAttachment) | ||
3243 | { | ||
3244 | ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar); | ||
3245 | if (sp != null) | ||
3246 | { | ||
3247 | sp.SendAttachmentUpdate(this, UpdateRequired.FULL); | ||
3248 | } | ||
3249 | } | ||
3250 | |||
3251 | /* this does nothing | ||
3252 | SendFullUpdateToClient(remoteClient, Position) ignores position parameter | ||
3241 | if (IsRoot) | 3253 | if (IsRoot) |
3242 | { | 3254 | { |
3243 | if (ParentGroup.IsAttachment) | 3255 | if (ParentGroup.IsAttachment) |
@@ -3249,6 +3261,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3249 | SendFullUpdateToClient(remoteClient, AbsolutePosition); | 3261 | SendFullUpdateToClient(remoteClient, AbsolutePosition); |
3250 | } | 3262 | } |
3251 | } | 3263 | } |
3264 | */ | ||
3252 | else | 3265 | else |
3253 | { | 3266 | { |
3254 | SendFullUpdateToClient(remoteClient); | 3267 | SendFullUpdateToClient(remoteClient); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index faa07d4..d471930 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1891,7 +1891,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1891 | foreach (SceneObjectGroup sog in m_attachments) | 1891 | foreach (SceneObjectGroup sog in m_attachments) |
1892 | { | 1892 | { |
1893 | SendFullUpdateToClient(ControllingClient); | 1893 | SendFullUpdateToClient(ControllingClient); |
1894 | sog.SendFullUpdateToClient(ControllingClient); | 1894 | SendAttachmentFullUpdateToAgentNF(sog, this); |
1895 | 1895 | ||
1896 | if (!sog.HasPrivateAttachmentPoint) | 1896 | if (!sog.HasPrivateAttachmentPoint) |
1897 | { | 1897 | { |
@@ -1905,7 +1905,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1905 | continue; | 1905 | continue; |
1906 | 1906 | ||
1907 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path | 1907 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path |
1908 | sog.SendFullUpdateToClient(p.ControllingClient); | 1908 | SendAttachmentFullUpdateToAgentNF(sog, p); |
1909 | }; | 1909 | }; |
1910 | } | 1910 | } |
1911 | sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); | 1911 | sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); |
@@ -4745,9 +4745,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
4745 | { | 4745 | { |
4746 | if (p != this && sog.HasPrivateAttachmentPoint) | 4746 | if (p != this && sog.HasPrivateAttachmentPoint) |
4747 | return; | 4747 | return; |
4748 | |||
4748 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4749 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) |
4749 | return; | 4750 | return; |
4750 | sog.SendFullUpdateToClient(p.ControllingClient); | 4751 | |
4752 | SendAttachmentFullUpdateToAgentNF(sog, p); | ||
4751 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path | 4753 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path |
4752 | }); | 4754 | }); |
4753 | } | 4755 | } |
@@ -4762,15 +4764,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
4762 | { | 4764 | { |
4763 | foreach (SceneObjectGroup sog in m_attachments) | 4765 | foreach (SceneObjectGroup sog in m_attachments) |
4764 | { | 4766 | { |
4765 | if (p == this || !sog.HasPrivateAttachmentPoint) | 4767 | SendAttachmentFullUpdateToAgentNF(sog, p); |
4766 | { | ||
4767 | sog.SendFullUpdateToClient(p.ControllingClient); | ||
4768 | } | ||
4769 | } | 4768 | } |
4770 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path | 4769 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path |
4771 | } | 4770 | } |
4772 | } | 4771 | } |
4773 | 4772 | ||
4773 | public void SendAttachmentFullUpdateToAgentNF(SceneObjectGroup sog, ScenePresence p) | ||
4774 | { | ||
4775 | if (p != this && sog.HasPrivateAttachmentPoint) | ||
4776 | return; | ||
4777 | |||
4778 | SceneObjectPart[] parts = sog.Parts; | ||
4779 | SceneObjectPart rootpart = sog.RootPart; | ||
4780 | |||
4781 | p.ControllingClient.SendEntityUpdate(rootpart, PrimUpdateFlags.FullUpdate); | ||
4782 | |||
4783 | for (int i = 0; i < parts.Length; i++) | ||
4784 | { | ||
4785 | SceneObjectPart part = parts[i]; | ||
4786 | if (part == rootpart) | ||
4787 | continue; | ||
4788 | p.ControllingClient.SendEntityUpdate(part, PrimUpdateFlags.FullUpdate); | ||
4789 | } | ||
4790 | } | ||
4791 | |||
4774 | public void SendAttachmentScheduleUpdate(SceneObjectGroup sog) | 4792 | public void SendAttachmentScheduleUpdate(SceneObjectGroup sog) |
4775 | { | 4793 | { |
4776 | if (IsChildAgent || IsInTransit) | 4794 | if (IsChildAgent || IsInTransit) |