aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs91
1 files changed, 38 insertions, 53 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5868251..8198481 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3811,6 +3811,11 @@ namespace OpenSim.Region.Framework.Scenes
3811 3811
3812 // Throttles 3812 // Throttles
3813 float multiplier = 1; 3813 float multiplier = 1;
3814
3815/* dont messup throttles
3816 * child agent is a full presence that can be just a few meters away across border
3817 * sending this is possible wrong since viewers may send own needs to each region
3818 *
3814 int childRegions = KnownRegionCount; 3819 int childRegions = KnownRegionCount;
3815 if (childRegions != 0) 3820 if (childRegions != 0)
3816 multiplier = 1f / childRegions; 3821 multiplier = 1f / childRegions;
@@ -3818,7 +3823,7 @@ namespace OpenSim.Region.Framework.Scenes
3818 // Minimum throttle for a child region is 1/4 of the root region throttle 3823 // Minimum throttle for a child region is 1/4 of the root region throttle
3819 if (multiplier <= 0.25f) 3824 if (multiplier <= 0.25f)
3820 multiplier = 0.25f; 3825 multiplier = 0.25f;
3821 3826*/
3822 cadu.throttles = ControllingClient.GetThrottlesPacked(multiplier); 3827 cadu.throttles = ControllingClient.GetThrottlesPacked(multiplier);
3823 cadu.Velocity = Velocity; 3828 cadu.Velocity = Velocity;
3824 3829
@@ -4814,43 +4819,43 @@ namespace OpenSim.Region.Framework.Scenes
4814 4819
4815 int j = 0; 4820 int j = 0;
4816 bool allterse = true; 4821 bool allterse = true;
4817
4818 for (int i = 0; i < origparts.Length; i++) 4822 for (int i = 0; i < origparts.Length; i++)
4819 { 4823 {
4820 switch (origparts[i].UpdateFlag) 4824 if (origparts[i] != rootpart)
4821 { 4825 {
4822 case UpdateRequired.TERSE: 4826 switch (origparts[i].UpdateFlag)
4823 flags[j] = PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity 4827 {
4824 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity; 4828 case UpdateRequired.NONE:
4825 parts[j] = origparts[i]; 4829 break;
4826 j++; 4830
4827 break; 4831 case UpdateRequired.TERSE:
4828 4832 flags[j] = PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
4829 case UpdateRequired.FULL: 4833 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity;
4830 flags[j] = PrimUpdateFlags.FullUpdate; 4834 parts[j] = origparts[i];
4831 parts[j] = origparts[i]; 4835 j++;
4832 j++; 4836 break;
4833 allterse = false; 4837
4834 break; 4838 case UpdateRequired.FULL:
4839 flags[j] = PrimUpdateFlags.FullUpdate;
4840 allterse = false;
4841 parts[j] = origparts[i];
4842 j++;
4843 break;
4844 }
4835 } 4845 }
4836 origparts[i].UpdateFlag = 0; 4846 origparts[i].UpdateFlag = 0;
4837 } 4847 }
4838 4848
4839 if (j == 0) 4849 if (j == 0 && rootreq == UpdateRequired.NONE)
4840 return; 4850 return;
4841 4851
4842 if (rootreq == UpdateRequired.NONE)
4843 {
4844 if (allterse)
4845 rootreq = UpdateRequired.TERSE;
4846 else
4847 rootreq = UpdateRequired.FULL;
4848 }
4849
4850 PrimUpdateFlags rootflag = PrimUpdateFlags.FullUpdate; 4852 PrimUpdateFlags rootflag = PrimUpdateFlags.FullUpdate;
4851 if (rootreq == UpdateRequired.TERSE) 4853
4854 if (rootreq != UpdateRequired.FULL && allterse)
4855 {
4852 rootflag = PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity 4856 rootflag = PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
4853 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity; 4857 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity;
4858 }
4854 4859
4855 int nparts = j; 4860 int nparts = j;
4856 4861
@@ -4870,10 +4875,7 @@ namespace OpenSim.Region.Framework.Scenes
4870 4875
4871 for (int i = 0; i < nparts; i++) 4876 for (int i = 0; i < nparts; i++)
4872 { 4877 {
4873 SceneObjectPart part = parts[i]; 4878 p.ControllingClient.SendEntityUpdate(parts[i], flags[i]);
4874 if (part == rootpart)
4875 continue;
4876 p.ControllingClient.SendEntityUpdate(part, flags[i]);
4877 } 4879 }
4878 } 4880 }
4879 } 4881 }
@@ -4902,6 +4904,8 @@ namespace OpenSim.Region.Framework.Scenes
4902 SceneObjectPart[] parts = sog.Parts; 4904 SceneObjectPart[] parts = sog.Parts;
4903 SceneObjectPart rootpart = sog.RootPart; 4905 SceneObjectPart rootpart = sog.RootPart;
4904 4906
4907 rootpart.UpdateFlag = 0;
4908
4905 bool priv = sog.HasPrivateAttachmentPoint; 4909 bool priv = sog.HasPrivateAttachmentPoint;
4906 4910
4907 List<ScenePresence> allPresences = m_scene.GetScenePresences(); 4911 List<ScenePresence> allPresences = m_scene.GetScenePresences();
@@ -4915,7 +4919,6 @@ namespace OpenSim.Region.Framework.Scenes
4915 } 4919 }
4916 4920
4917 p.ControllingClient.SendEntityUpdate(rootpart, flag); 4921 p.ControllingClient.SendEntityUpdate(rootpart, flag);
4918 rootpart.UpdateFlag = 0;
4919 4922
4920 for (int i = 0; i < parts.Length; i++) 4923 for (int i = 0; i < parts.Length; i++)
4921 { 4924 {
@@ -4950,6 +4953,8 @@ namespace OpenSim.Region.Framework.Scenes
4950 return; 4953 return;
4951 } 4954 }
4952 4955
4956 part.UpdateFlag = 0;
4957
4953 bool priv = part.ParentGroup.HasPrivateAttachmentPoint; 4958 bool priv = part.ParentGroup.HasPrivateAttachmentPoint;
4954 4959
4955 List<ScenePresence> allPresences = m_scene.GetScenePresences(); 4960 List<ScenePresence> allPresences = m_scene.GetScenePresences();
@@ -4964,7 +4969,6 @@ namespace OpenSim.Region.Framework.Scenes
4964 } 4969 }
4965 4970
4966 p.ControllingClient.SendEntityUpdate(part, flag); 4971 p.ControllingClient.SendEntityUpdate(part, flag);
4967 part.UpdateFlag = 0;
4968 } 4972 }
4969 } 4973 }
4970 4974
@@ -4989,6 +4993,8 @@ namespace OpenSim.Region.Framework.Scenes
4989 return; 4993 return;
4990 } 4994 }
4991 4995
4996 part.UpdateFlag = 0;
4997
4992 bool priv = part.ParentGroup.HasPrivateAttachmentPoint; 4998 bool priv = part.ParentGroup.HasPrivateAttachmentPoint;
4993 4999
4994 List<ScenePresence> allPresences = m_scene.GetScenePresences(); 5000 List<ScenePresence> allPresences = m_scene.GetScenePresences();
@@ -5002,7 +5008,6 @@ namespace OpenSim.Region.Framework.Scenes
5002 } 5008 }
5003 5009
5004 p.ControllingClient.SendEntityUpdate(part, flag); 5010 p.ControllingClient.SendEntityUpdate(part, flag);
5005 part.UpdateFlag = 0;
5006 } 5011 }
5007 } 5012 }
5008 5013
@@ -5768,26 +5773,6 @@ namespace OpenSim.Region.Framework.Scenes
5768 } 5773 }
5769 } 5774 }
5770 5775
5771 public void parcelRegionCross()
5772 {
5773 if (!ParcelHideThisAvatar || GodLevel >= 200)
5774 return;
5775
5776 List<ScenePresence> allpresences = null;
5777 allpresences = m_scene.GetScenePresences();
5778
5779 foreach (ScenePresence p in allpresences)
5780 {
5781 if (p.IsDeleted || p == this || p.IsChildAgent || p.ControllingClient == null || !p.ControllingClient.IsActive)
5782 continue;
5783
5784 if (p.currentParcelUUID == m_currentParcelUUID)
5785 {
5786 p.SendKillTo(this);
5787 }
5788 }
5789 }
5790
5791 private void ParcelCrossCheck(UUID currentParcelID,UUID previusParcelID, 5776 private void ParcelCrossCheck(UUID currentParcelID,UUID previusParcelID,
5792 bool currentParcelHide, bool previusParcelHide, bool oldhide,bool check) 5777 bool currentParcelHide, bool previusParcelHide, bool oldhide,bool check)
5793 { 5778 {