From 9dbcb4e5f687f576ec23794cdf85b41130fea0b0 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 10 Jul 2017 19:31:35 +0100 Subject: on entities updates throttles vectors needed to be compared as vectors, not just their norms --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7e3adb9..c1b62af 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3789,17 +3789,6 @@ namespace OpenSim.Region.Framework.Scenes // Send terse position update if not sitting and position, velocity, or rotation // has changed significantly from last sent update - if (!IsSatOnObject && ( - !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 ) - ) ) - { -/* if (!IsSatOnObject) { // this does need to be more complex later @@ -3813,6 +3802,7 @@ namespace OpenSim.Region.Framework.Scenes Math.Abs(m_bodyRot.Y - m_lastRotation.Y) > ROTATION_TOLERANCE || Math.Abs(m_bodyRot.Z - m_lastRotation.Z) > ROTATION_TOLERANCE || + (vel == Vector3.Zero && m_lastVelocity != Vector3.Zero) || Math.Abs(dpos.X) > POSITION_LARGETOLERANCE || Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE || Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE || @@ -3823,9 +3813,8 @@ namespace OpenSim.Region.Framework.Scenes && vel.LengthSquared() < LOWVELOCITYSQ )) { -*/ SendTerseUpdateToAllClients(); -// } + } } CheckForSignificantMovement(); } -- cgit v1.1