aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index feab35c..1e90d56 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2415,17 +2415,19 @@ namespace OpenSim.Region.Framework.Scenes
2415 2415
2416 Vector3 expectedPosition = lastPositionSentToAllClients + lastVelocitySentToAllClients * timeSinceLastUpdate; 2416 Vector3 expectedPosition = lastPositionSentToAllClients + lastVelocitySentToAllClients * timeSinceLastUpdate;
2417 2417
2418 float absoluteDistanceError = (float)Math.Abs(Vector3.Distance(m_pos, expectedPosition)); 2418 float distanceError = Vector3.Distance(OffsetPosition, expectedPosition);
2419 2419
2420 float speed = Velocity.Length();
2421 float velocidyDiff = Vector3.Distance(lastVelocitySentToAllClients, Velocity);
2420 2422
2421 if (m_velocity.Length() < 0.01f 2423 if (speed < 0.01f // allow rotation updates if avatar position is unchanged
2422 || absoluteDistanceError > 0.25f // arbitrary distance error threshold 2424 || Math.Abs(distanceError) > 0.25f // arbitrary distance error threshold
2423 || Vector3.Distance(lastVelocitySentToAllClients, m_velocity) > 0.01f) 2425 || velocidyDiff > 0.01f) // did velocity change from last update?
2424 { 2426 {
2425 m_perfMonMS = currentTick; 2427 m_perfMonMS = currentTick;
2426 lastVelocitySentToAllClients = m_velocity; 2428 lastVelocitySentToAllClients = Velocity;
2427 lastTerseUpdateToAllClientsTick = currentTick; 2429 lastTerseUpdateToAllClientsTick = currentTick;
2428 lastPositionSentToAllClients = m_pos; 2430 lastPositionSentToAllClients = OffsetPosition;
2429 2431
2430 m_scene.ForEachClient(SendTerseUpdateToClient); 2432 m_scene.ForEachClient(SendTerseUpdateToClient);
2431 2433