mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
Add check to always push terse updates for presences that have new velocities of zero.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user