diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 38a0cff..0b752c9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1015,9 +1015,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1015 | } | 1015 | } |
1016 | } | 1016 | } |
1017 | 1017 | ||
1018 | public float GetTimeDilation() | 1018 | public ushort GetTimeDilation() |
1019 | { | 1019 | { |
1020 | return m_scene.TimeDilation; | 1020 | return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); |
1021 | } | 1021 | } |
1022 | 1022 | ||
1023 | /// <summary> | 1023 | /// <summary> |
@@ -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 | ||