aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-28 14:13:17 -0700
committerJohn Hurliman2009-10-28 14:13:17 -0700
commitb81c829576dd916c0a7bf141919f5e13f025d818 (patch)
tree92e537b80a4cded51d1cccd2a3ba4dfb12c1665c /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-b81c829576dd916c0a7bf141919f5e13f025d818.zip
opensim-SC_OLD-b81c829576dd916c0a7bf141919f5e13f025d818.tar.gz
opensim-SC_OLD-b81c829576dd916c0a7bf141919f5e13f025d818.tar.bz2
opensim-SC_OLD-b81c829576dd916c0a7bf141919f5e13f025d818.tar.xz
* Standalone logins will now go through the sequence of "requested region, default region, any region" before giving up
* Hip offset should have been added not subtracted (it's a negative offset). This puts avatar feet closer to the ground * Improved duplicate checking for terse updates. This should reduce bandwidth and walking through walls
Diffstat (limited to '')
-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();