aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-28 03:21:53 -0700
committerJohn Hurliman2009-10-28 03:21:53 -0700
commitcdbeb8b83b671df1ffb6bf7890c64a27e4a85730 (patch)
tree41a471f57c5bc9e39dfbfacd169a7d3dda1122b1 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentMarking ImprovedTerseObjectUpdate packets for avatars as unthrottled to test (diff)
downloadopensim-SC-cdbeb8b83b671df1ffb6bf7890c64a27e4a85730.zip
opensim-SC-cdbeb8b83b671df1ffb6bf7890c64a27e4a85730.tar.gz
opensim-SC-cdbeb8b83b671df1ffb6bf7890c64a27e4a85730.tar.bz2
opensim-SC-cdbeb8b83b671df1ffb6bf7890c64a27e4a85730.tar.xz
Track timestamps when terse updates were last sent for a prim or avatar to avoid floating away forever until a key is pressed (deviates from SL behavior in a hopefully good way)
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 9b11582..e1588ce 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -253,6 +253,7 @@ namespace OpenSim.Region.Framework.Scenes
253 protected Vector3 m_lastVelocity; 253 protected Vector3 m_lastVelocity;
254 protected Vector3 m_lastAcceleration; 254 protected Vector3 m_lastAcceleration;
255 protected Vector3 m_lastAngularVelocity; 255 protected Vector3 m_lastAngularVelocity;
256 protected int m_lastTerseSent;
256 257
257 // TODO: Those have to be changed into persistent properties at some later point, 258 // TODO: Those have to be changed into persistent properties at some later point,
258 // or sit-camera on vehicles will break on sim-crossing. 259 // or sit-camera on vehicles will break on sim-crossing.
@@ -2395,6 +2396,7 @@ if (m_shape != null) {
2395 { 2396 {
2396 const float VELOCITY_TOLERANCE = 0.01f; 2397 const float VELOCITY_TOLERANCE = 0.01f;
2397 const float POSITION_TOLERANCE = 0.1f; 2398 const float POSITION_TOLERANCE = 0.1f;
2399 const int TIME_MS_TOLERANCE = 3000;
2398 2400
2399 if (m_updateFlag == 1) 2401 if (m_updateFlag == 1)
2400 { 2402 {
@@ -2403,7 +2405,8 @@ if (m_shape != null) {
2403 Acceleration != m_lastAcceleration || 2405 Acceleration != m_lastAcceleration ||
2404 (Velocity - m_lastVelocity).Length() > VELOCITY_TOLERANCE || 2406 (Velocity - m_lastVelocity).Length() > VELOCITY_TOLERANCE ||
2405 (RotationalVelocity - m_lastAngularVelocity).Length() > VELOCITY_TOLERANCE || 2407 (RotationalVelocity - m_lastAngularVelocity).Length() > VELOCITY_TOLERANCE ||
2406 (OffsetPosition - m_lastPosition).Length() > POSITION_TOLERANCE) 2408 (OffsetPosition - m_lastPosition).Length() > POSITION_TOLERANCE ||
2409 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
2407 { 2410 {
2408 AddTerseUpdateToAllAvatars(); 2411 AddTerseUpdateToAllAvatars();
2409 ClearUpdateSchedule(); 2412 ClearUpdateSchedule();
@@ -2422,6 +2425,7 @@ if (m_shape != null) {
2422 m_lastVelocity = Velocity; 2425 m_lastVelocity = Velocity;
2423 m_lastAcceleration = Acceleration; 2426 m_lastAcceleration = Acceleration;
2424 m_lastAngularVelocity = RotationalVelocity; 2427 m_lastAngularVelocity = RotationalVelocity;
2428 m_lastTerseSent = Environment.TickCount;
2425 } 2429 }
2426 } 2430 }
2427 else 2431 else