aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs48
1 files changed, 41 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index fe9b1bb..f58d7f2 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1908,10 +1908,12 @@ namespace OpenSim.Region.Framework.Scenes
1908 // sog.ScheduleGroupForFullUpdate(); 1908 // sog.ScheduleGroupForFullUpdate();
1909 m_scene.ForEachScenePresence(delegate(ScenePresence p) 1909 m_scene.ForEachScenePresence(delegate(ScenePresence p)
1910 { 1910 {
1911 if (p != this && sog.HasPrivateAttachmentPoint)
1912 return;
1911 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) 1913 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
1912 return; 1914 return;
1913 sog.SendFullUpdateToClient(p.ControllingClient); 1915 sog.SendFullUpdateToClient(p.ControllingClient);
1914 p.ControllingClient.SendAvatarDataImmediate(this); // resend our data -> test 1916 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
1915 }); 1917 });
1916 1918
1917 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); 1919 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
@@ -3377,6 +3379,16 @@ namespace OpenSim.Region.Framework.Scenes
3377 ControllingClient.SendAgentTerseUpdate(p); 3379 ControllingClient.SendAgentTerseUpdate(p);
3378 } 3380 }
3379 3381
3382 public void SendFullUpdateToClient(IClientAPI remoteClient)
3383 {
3384 if (remoteClient.IsActive)
3385 {
3386 //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity);
3387 remoteClient.SendEntityUpdate(this, PrimUpdateFlags.FullUpdate);
3388 m_scene.StatsReporter.AddAgentUpdates(1);
3389 }
3390 }
3391
3380 /// <summary> 3392 /// <summary>
3381 /// Sends a location update to the client connected to this scenePresence 3393 /// Sends a location update to the client connected to this scenePresence
3382 /// via entity updates 3394 /// via entity updates
@@ -4672,15 +4684,37 @@ namespace OpenSim.Region.Framework.Scenes
4672 return validated; 4684 return validated;
4673 } 4685 }
4674 4686
4687 public void SendAttachmentsToAllAgents()
4688 {
4689 lock (m_attachments)
4690 {
4691 foreach (SceneObjectGroup sog in m_attachments)
4692 {
4693 m_scene.ForEachScenePresence(delegate(ScenePresence p)
4694 {
4695 if (p != this && sog.HasPrivateAttachmentPoint)
4696 return;
4697 if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
4698 return;
4699 sog.SendFullUpdateToClient(p.ControllingClient);
4700 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
4701 });
4702 }
4703 }
4704 }
4675 4705
4676 public void SendAttachmentsToClient(IClientAPI client) 4706 // send attachments to a client without filters except for huds
4707 // for now they are checked in several places down the line...
4708 public void SendAttachmentsToAgentNF(ScenePresence p)
4677 { 4709 {
4678 lock (m_attachments) 4710 lock (m_attachments)
4679 { 4711 {
4680 foreach (SceneObjectGroup gobj in m_attachments) 4712 foreach (SceneObjectGroup sog in m_attachments)
4681 { 4713 {
4682 gobj.SendFullUpdateToClient(client); 4714 if (p == this || !sog.HasPrivateAttachmentPoint)
4715 sog.SendFullUpdateToClient(p.ControllingClient);
4683 } 4716 }
4717 SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
4684 } 4718 }
4685 } 4719 }
4686 4720
@@ -5458,7 +5492,7 @@ namespace OpenSim.Region.Framework.Scenes
5458 m_log.Debug("[AVATAR]: viewMe: " + Lastname + " " + p.Lastname); 5492 m_log.Debug("[AVATAR]: viewMe: " + Lastname + " " + p.Lastname);
5459 ControllingClient.SendAvatarDataImmediate(p); 5493 ControllingClient.SendAvatarDataImmediate(p);
5460 p.SendAppearanceToAgent(this); 5494 p.SendAppearanceToAgent(this);
5461 p.SendAttachmentsToClient(ControllingClient); 5495 p.SendAttachmentsToAgentNF(this);
5462 if (p.Animator != null) 5496 if (p.Animator != null)
5463 p.Animator.SendAnimPackToClient(ControllingClient); 5497 p.Animator.SendAnimPackToClient(ControllingClient);
5464 5498
@@ -5775,7 +5809,7 @@ namespace OpenSim.Region.Framework.Scenes
5775 p.ControllingClient.SendAvatarDataImmediate(this); 5809 p.ControllingClient.SendAvatarDataImmediate(this);
5776// m_log.Debug("[AVATAR]: viewTo: " + Lastname + " " + p.Lastname); 5810// m_log.Debug("[AVATAR]: viewTo: " + Lastname + " " + p.Lastname);
5777 SendAppearanceToAgent(p); 5811 SendAppearanceToAgent(p);
5778 SendAttachmentsToClient(p.ControllingClient); 5812 SendAttachmentsToAgentNF(p);
5779 if (Animator != null) 5813 if (Animator != null)
5780 Animator.SendAnimPackToClient(p.ControllingClient); 5814 Animator.SendAnimPackToClient(p.ControllingClient);
5781 } 5815 }
@@ -5790,7 +5824,7 @@ namespace OpenSim.Region.Framework.Scenes
5790// m_log.Debug("[AVATAR]: viewMe: " + Lastname + "<-" + p.Lastname); 5824// m_log.Debug("[AVATAR]: viewMe: " + Lastname + "<-" + p.Lastname);
5791 ControllingClient.SendAvatarDataImmediate(p); 5825 ControllingClient.SendAvatarDataImmediate(p);
5792 p.SendAppearanceToAgent(this); 5826 p.SendAppearanceToAgent(this);
5793 p.SendAttachmentsToClient(ControllingClient); 5827 p.SendAttachmentsToAgentNF(this);
5794 if (p.Animator != null) 5828 if (p.Animator != null)
5795 p.Animator.SendAnimPackToClient(ControllingClient); 5829 p.Animator.SendAnimPackToClient(ControllingClient);
5796 } 5830 }