aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2013-01-11 16:02:14 +0000
committerUbitUmarov2013-01-11 16:02:14 +0000
commit819f4b338d7c998a6e93b4558d6bd005a097904d (patch)
treec2f743ff452eb6a12a602a521ee00e5c32276990 /OpenSim/Region
parent same for AngularVelocity. Use normal terse updates in place of sending (diff)
downloadopensim-SC_OLD-819f4b338d7c998a6e93b4558d6bd005a097904d.zip
opensim-SC_OLD-819f4b338d7c998a6e93b4558d6bd005a097904d.tar.gz
opensim-SC_OLD-819f4b338d7c998a6e93b4558d6bd005a097904d.tar.bz2
opensim-SC_OLD-819f4b338d7c998a6e93b4558d6bd005a097904d.tar.xz
remove redundant lastPhysGroupPos and lastPhysGroupRot checks
in SOG Update(). rootpart does more complet checks
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs19
1 files changed, 3 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 4ad8b11..b008e66 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -307,9 +307,6 @@ namespace OpenSim.Region.Framework.Scenes
307 get { return RootPart.VolumeDetectActive; } 307 get { return RootPart.VolumeDetectActive; }
308 } 308 }
309 309
310 private Vector3 lastPhysGroupPos;
311 private Quaternion lastPhysGroupRot;
312
313 private bool m_isBackedUp; 310 private bool m_isBackedUp;
314 311
315 public bool IsBackedUp 312 public bool IsBackedUp
@@ -2525,6 +2522,7 @@ namespace OpenSim.Region.Framework.Scenes
2525 2522
2526 #endregion 2523 #endregion
2527 2524
2525
2528 public override void Update() 2526 public override void Update()
2529 { 2527 {
2530 // Check that the group was not deleted before the scheduled update 2528 // Check that the group was not deleted before the scheduled update
@@ -2543,19 +2541,8 @@ namespace OpenSim.Region.Framework.Scenes
2543 // check to see if the physical position or rotation warrant an update. 2541 // check to see if the physical position or rotation warrant an update.
2544 if (m_rootPart.UpdateFlag == UpdateRequired.NONE) 2542 if (m_rootPart.UpdateFlag == UpdateRequired.NONE)
2545 { 2543 {
2546 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); 2544 // rootpart SendScheduledUpdates will check if a update is needed
2547 2545 m_rootPart.UpdateFlag = UpdateRequired.TERSE;
2548 if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
2549 {
2550 m_rootPart.UpdateFlag = UpdateRequired.TERSE;
2551 lastPhysGroupPos = AbsolutePosition;
2552 }
2553
2554 if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
2555 {
2556 m_rootPart.UpdateFlag = UpdateRequired.TERSE;
2557 lastPhysGroupRot = GroupRotation;
2558 }
2559 } 2546 }
2560 2547
2561 SceneObjectPart[] parts = m_parts.GetArray(); 2548 SceneObjectPart[] parts = m_parts.GetArray();