From 5afab9bcfe9e163219cf6b4317a8914860e3f969 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 27 Dec 2012 16:03:14 -0800 Subject: Add check to always push terse updates for presences that have new velocities of zero. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 58721b0..a60c551 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2335,9 +2335,14 @@ namespace OpenSim.Region.Framework.Scenes // storing a requested force instead of an actual traveling velocity // Throw away duplicate or insignificant updates - if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || - !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || - !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) + if ( + // If the velocity has become zero, send it no matter what. + (Velocity != m_lastVelocity && Velocity == Vector3.Zero) + // otherwise, if things have changed reasonably, send the update + || (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) + || !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) + || !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))) + { SendTerseUpdateToAllClients(); -- cgit v1.1