aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-28 23:10:16 -0700
committerJohn Hurliman2009-10-28 23:10:16 -0700
commit59eb378d16fd8a9e887560a2744cc798fef08263 (patch)
tree4bcb0d1f3b00ecbc17ee220928646aaba09d334c /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parentAlways send a time dilation of 1.0 while we debug rubberbanding issues (diff)
downloadopensim-SC-59eb378d16fd8a9e887560a2744cc798fef08263.zip
opensim-SC-59eb378d16fd8a9e887560a2744cc798fef08263.tar.gz
opensim-SC-59eb378d16fd8a9e887560a2744cc798fef08263.tar.bz2
opensim-SC-59eb378d16fd8a9e887560a2744cc798fef08263.tar.xz
Small performance tweaks to code called by the heartbeat loop
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs17
1 files changed, 2 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index dbb06f8..0b752c9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1857,28 +1857,15 @@ namespace OpenSim.Region.Framework.Scenes
1857 { 1857 {
1858 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); 1858 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
1859 1859
1860 //if (IsAttachment) 1860 if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
1861 //{
1862 //foreach (SceneObjectPart part in m_parts.Values)
1863 //{
1864 //part.SendScheduledUpdates();
1865 //}
1866 //return;
1867 //}
1868
1869 if (UsePhysics && Util.DistanceLessThan(lastPhysGroupPos, AbsolutePosition, 0.02))
1870 { 1861 {
1871 m_rootPart.UpdateFlag = 1; 1862 m_rootPart.UpdateFlag = 1;
1872 lastPhysGroupPos = AbsolutePosition; 1863 lastPhysGroupPos = AbsolutePosition;
1873 } 1864 }
1874 1865
1875 if (UsePhysics && ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) 1866 if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
1876 || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
1877 || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1)
1878 || (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1)))
1879 { 1867 {
1880 m_rootPart.UpdateFlag = 1; 1868 m_rootPart.UpdateFlag = 1;
1881
1882 lastPhysGroupRot = GroupRotation; 1869 lastPhysGroupRot = GroupRotation;
1883 } 1870 }
1884 1871