aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a99a802..c16c4fe 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2394,18 +2394,19 @@ if (m_shape != null) {
2394 /// </summary> 2394 /// </summary>
2395 public void SendScheduledUpdates() 2395 public void SendScheduledUpdates()
2396 { 2396 {
2397 const float VELOCITY_TOLERANCE = 0.0001f; 2397 const float ROTATION_TOLERANCE = 0.01f;
2398 const float POSITION_TOLERANCE = 0.1f; 2398 const float VELOCITY_TOLERANCE = 0.001f;
2399 const float POSITION_TOLERANCE = 0.05f;
2399 const int TIME_MS_TOLERANCE = 3000; 2400 const int TIME_MS_TOLERANCE = 3000;
2400 2401
2401 if (m_updateFlag == 1) 2402 if (m_updateFlag == 1)
2402 { 2403 {
2403 // Throw away duplicate or insignificant updates 2404 // Throw away duplicate or insignificant updates
2404 if (RotationOffset != m_lastRotation || 2405 if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
2405 Acceleration != m_lastAcceleration || 2406 !Acceleration.Equals(m_lastAcceleration) ||
2406 (Velocity - m_lastVelocity).Length() > VELOCITY_TOLERANCE || 2407 !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
2407 (RotationalVelocity - m_lastAngularVelocity).Length() > VELOCITY_TOLERANCE || 2408 !RotationalVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
2408 (OffsetPosition - m_lastPosition).Length() > POSITION_TOLERANCE || 2409 !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
2409 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) 2410 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
2410 { 2411 {
2411 AddTerseUpdateToAllAvatars(); 2412 AddTerseUpdateToAllAvatars();