aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDan Lake2011-11-10 14:09:35 -0800
committerDan Lake2011-11-10 14:09:35 -0800
commit18c625bda669509fc9aae330703fe09ff7a6c72e (patch)
tree613d18a8a9bd984e5198b9a7d7b4b6ee6c1a8c60 /OpenSim
parentone final attempt and then im giving up on panda!!!!! (diff)
downloadopensim-SC_OLD-18c625bda669509fc9aae330703fe09ff7a6c72e.zip
opensim-SC_OLD-18c625bda669509fc9aae330703fe09ff7a6c72e.tar.gz
opensim-SC_OLD-18c625bda669509fc9aae330703fe09ff7a6c72e.tar.bz2
opensim-SC_OLD-18c625bda669509fc9aae330703fe09ff7a6c72e.tar.xz
When updating SOG, a physics taint should not override a full update with a terse update
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs25
1 files changed, 15 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 339cf0f..f6bfc9b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1731,18 +1731,23 @@ namespace OpenSim.Region.Framework.Scenes
1731 //if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0) 1731 //if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)
1732 // return; 1732 // return;
1733 1733
1734 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); 1734 // If we somehow got here to updating the SOG and its root part is not scheduled for update,
1735 1735 // check to see if the physical position or rotation warrant an update.
1736 if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f)) 1736 if (m_rootPart.UpdateFlag == UpdateRequired.NONE)
1737 { 1737 {
1738 m_rootPart.UpdateFlag = UpdateRequired.TERSE; 1738 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
1739 lastPhysGroupPos = AbsolutePosition;
1740 }
1741 1739
1742 if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f)) 1740 if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
1743 { 1741 {
1744 m_rootPart.UpdateFlag = UpdateRequired.TERSE; 1742 m_rootPart.UpdateFlag = UpdateRequired.TERSE;
1745 lastPhysGroupRot = GroupRotation; 1743 lastPhysGroupPos = AbsolutePosition;
1744 }
1745
1746 if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
1747 {
1748 m_rootPart.UpdateFlag = UpdateRequired.TERSE;
1749 lastPhysGroupRot = GroupRotation;
1750 }
1746 } 1751 }
1747 1752
1748 SceneObjectPart[] parts = m_parts.GetArray(); 1753 SceneObjectPart[] parts = m_parts.GetArray();