diff options
Merge branch 'master' into bigmerge
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a3ac756..b758b8f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2119,18 +2119,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
2119 | //if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0) | 2119 | //if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0) |
2120 | // return; | 2120 | // return; |
2121 | 2121 | ||
2122 | bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); | 2122 | // If we somehow got here to updating the SOG and its root part is not scheduled for update, |
2123 | 2123 | // check to see if the physical position or rotation warrant an update. | |
2124 | if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f)) | 2124 | if (m_rootPart.UpdateFlag == UpdateRequired.NONE) |
2125 | { | 2125 | { |
2126 | m_rootPart.UpdateFlag = UpdateRequired.TERSE; | 2126 | bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); |
2127 | lastPhysGroupPos = AbsolutePosition; | ||
2128 | } | ||
2129 | 2127 | ||
2130 | if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f)) | 2128 | if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f)) |
2131 | { | 2129 | { |
2132 | m_rootPart.UpdateFlag = UpdateRequired.TERSE; | 2130 | m_rootPart.UpdateFlag = UpdateRequired.TERSE; |
2133 | lastPhysGroupRot = GroupRotation; | 2131 | lastPhysGroupPos = AbsolutePosition; |
2132 | } | ||
2133 | |||
2134 | if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f)) | ||
2135 | { | ||
2136 | m_rootPart.UpdateFlag = UpdateRequired.TERSE; | ||
2137 | lastPhysGroupRot = GroupRotation; | ||
2138 | } | ||
2134 | } | 2139 | } |
2135 | 2140 | ||
2136 | SceneObjectPart[] parts = m_parts.GetArray(); | 2141 | SceneObjectPart[] parts = m_parts.GetArray(); |