diff options
author | Robert Adams | 2012-12-27 16:03:14 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-27 22:12:27 -0800 |
commit | 5afab9bcfe9e163219cf6b4317a8914860e3f969 (patch) | |
tree | feec9c76874df48711dc38e26d8cc4ef17c6d501 /OpenSim/Region | |
parent | BulletSim: fix buoyancy so it's properly set by a script when an (diff) | |
download | opensim-SC_OLD-5afab9bcfe9e163219cf6b4317a8914860e3f969.zip opensim-SC_OLD-5afab9bcfe9e163219cf6b4317a8914860e3f969.tar.gz opensim-SC_OLD-5afab9bcfe9e163219cf6b4317a8914860e3f969.tar.bz2 opensim-SC_OLD-5afab9bcfe9e163219cf6b4317a8914860e3f969.tar.xz |
Add check to always push terse updates for presences that have new velocities of zero.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 |
1 files changed, 8 insertions, 3 deletions
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 | |||
2335 | // storing a requested force instead of an actual traveling velocity | 2335 | // storing a requested force instead of an actual traveling velocity |
2336 | 2336 | ||
2337 | // Throw away duplicate or insignificant updates | 2337 | // Throw away duplicate or insignificant updates |
2338 | if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || | 2338 | if ( |
2339 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || | 2339 | // If the velocity has become zero, send it no matter what. |
2340 | !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) | 2340 | (Velocity != m_lastVelocity && Velocity == Vector3.Zero) |
2341 | // otherwise, if things have changed reasonably, send the update | ||
2342 | || (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) | ||
2343 | || !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) | ||
2344 | || !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))) | ||
2345 | |||
2341 | { | 2346 | { |
2342 | SendTerseUpdateToAllClients(); | 2347 | SendTerseUpdateToAllClients(); |
2343 | 2348 | ||