From feb058f5c53b76ab0dab1680d2b0dd15fd2bfa6d Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 6 Mar 2016 11:30:25 -0800 Subject: BulletSim: Send out avatar position update if velocity is now zero and it wasn't zero last tick. This will prevent some avatar creeping. Adjust BulletSim default avatar velocity zeroing so the avatar stops sooner. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b281e5f..e4c9de1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3571,6 +3571,9 @@ namespace OpenSim.Region.Framework.Scenes !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || !m_pos.ApproxEquals(m_lastPosition, POSITION_LARGETOLERANCE) + // if velocity is zero and it wasn't zero last time, send the update + || (Velocity == Vector3.Zero && m_lastVelocity != Vector3.Zero) + // if position has moved just a little and velocity is very low, send the update || (!m_pos.ApproxEquals(m_lastPosition, POSITION_SMALLTOLERANCE) && Velocity.LengthSquared() < LOWVELOCITYSQ ) ) ) { -- cgit v1.1