From 819f4b338d7c998a6e93b4558d6bd005a097904d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 11 Jan 2013 16:02:14 +0000 Subject: [PATCH] remove redundant lastPhysGroupPos and lastPhysGroupRot checks in SOG Update(). rootpart does more complet checks --- .../Framework/Scenes/SceneObjectGroup.cs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 4ad8b11098..b008e6698d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -307,9 +307,6 @@ namespace OpenSim.Region.Framework.Scenes get { return RootPart.VolumeDetectActive; } } - private Vector3 lastPhysGroupPos; - private Quaternion lastPhysGroupRot; - private bool m_isBackedUp; public bool IsBackedUp @@ -2525,6 +2522,7 @@ namespace OpenSim.Region.Framework.Scenes #endregion + public override void Update() { // Check that the group was not deleted before the scheduled update @@ -2543,19 +2541,8 @@ namespace OpenSim.Region.Framework.Scenes // check to see if the physical position or rotation warrant an update. if (m_rootPart.UpdateFlag == UpdateRequired.NONE) { - bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); - - if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f)) - { - m_rootPart.UpdateFlag = UpdateRequired.TERSE; - lastPhysGroupPos = AbsolutePosition; - } - - if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f)) - { - m_rootPart.UpdateFlag = UpdateRequired.TERSE; - lastPhysGroupRot = GroupRotation; - } + // rootpart SendScheduledUpdates will check if a update is needed + m_rootPart.UpdateFlag = UpdateRequired.TERSE; } SceneObjectPart[] parts = m_parts.GetArray();