diff options
author | UbitUmarov | 2017-07-10 19:31:35 +0100 |
---|---|---|
committer | UbitUmarov | 2017-07-10 19:31:35 +0100 |
commit | 9dbcb4e5f687f576ec23794cdf85b41130fea0b0 (patch) | |
tree | a44af36ec32b633fc83d434ce93325facbd8901e /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | fix the name of a funtion on last commit (diff) | |
download | opensim-SC-9dbcb4e5f687f576ec23794cdf85b41130fea0b0.zip opensim-SC-9dbcb4e5f687f576ec23794cdf85b41130fea0b0.tar.gz opensim-SC-9dbcb4e5f687f576ec23794cdf85b41130fea0b0.tar.bz2 opensim-SC-9dbcb4e5f687f576ec23794cdf85b41130fea0b0.tar.xz |
on entities updates throttles vectors needed to be compared as vectors, not just their norms
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 |
1 files changed, 2 insertions, 13 deletions
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 | |||
3789 | 3789 | ||
3790 | // Send terse position update if not sitting and position, velocity, or rotation | 3790 | // Send terse position update if not sitting and position, velocity, or rotation |
3791 | // has changed significantly from last sent update | 3791 | // has changed significantly from last sent update |
3792 | if (!IsSatOnObject && ( | ||
3793 | !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) | ||
3794 | || !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) | ||
3795 | || !m_pos.ApproxEquals(m_lastPosition, POSITION_LARGETOLERANCE) | ||
3796 | // if velocity is zero and it wasn't zero last time, send the update | ||
3797 | || (Velocity == Vector3.Zero && m_lastVelocity != Vector3.Zero) | ||
3798 | // if position has moved just a little and velocity is very low, send the update | ||
3799 | || (!m_pos.ApproxEquals(m_lastPosition, POSITION_SMALLTOLERANCE) && Velocity.LengthSquared() < LOWVELOCITYSQ ) | ||
3800 | ) ) | ||
3801 | { | ||
3802 | /* | ||
3803 | if (!IsSatOnObject) | 3792 | if (!IsSatOnObject) |
3804 | { | 3793 | { |
3805 | // this does need to be more complex later | 3794 | // this does need to be more complex later |
@@ -3813,6 +3802,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3813 | Math.Abs(m_bodyRot.Y - m_lastRotation.Y) > ROTATION_TOLERANCE || | 3802 | Math.Abs(m_bodyRot.Y - m_lastRotation.Y) > ROTATION_TOLERANCE || |
3814 | Math.Abs(m_bodyRot.Z - m_lastRotation.Z) > ROTATION_TOLERANCE || | 3803 | Math.Abs(m_bodyRot.Z - m_lastRotation.Z) > ROTATION_TOLERANCE || |
3815 | 3804 | ||
3805 | (vel == Vector3.Zero && m_lastVelocity != Vector3.Zero) || | ||
3816 | Math.Abs(dpos.X) > POSITION_LARGETOLERANCE || | 3806 | Math.Abs(dpos.X) > POSITION_LARGETOLERANCE || |
3817 | Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE || | 3807 | Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE || |
3818 | Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE || | 3808 | Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE || |
@@ -3823,9 +3813,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3823 | && vel.LengthSquared() < LOWVELOCITYSQ | 3813 | && vel.LengthSquared() < LOWVELOCITYSQ |
3824 | )) | 3814 | )) |
3825 | { | 3815 | { |
3826 | */ | ||
3827 | SendTerseUpdateToAllClients(); | 3816 | SendTerseUpdateToAllClients(); |
3828 | // } | 3817 | } |
3829 | } | 3818 | } |
3830 | CheckForSignificantMovement(); | 3819 | CheckForSignificantMovement(); |
3831 | } | 3820 | } |