mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
* Standalone logins will now go through the sequence of "requested region, default region, any region" before giving up
* Hip offset should have been added not subtracted (it's a negative offset). This puts avatar feet closer to the ground * Improved duplicate checking for terse updates. This should reduce bandwidth and walking through walls
This commit is contained in:
@@ -2394,18 +2394,19 @@ if (m_shape != null) {
|
||||
/// </summary>
|
||||
public void SendScheduledUpdates()
|
||||
{
|
||||
const float VELOCITY_TOLERANCE = 0.0001f;
|
||||
const float POSITION_TOLERANCE = 0.1f;
|
||||
const float ROTATION_TOLERANCE = 0.01f;
|
||||
const float VELOCITY_TOLERANCE = 0.001f;
|
||||
const float POSITION_TOLERANCE = 0.05f;
|
||||
const int TIME_MS_TOLERANCE = 3000;
|
||||
|
||||
if (m_updateFlag == 1)
|
||||
{
|
||||
// Throw away duplicate or insignificant updates
|
||||
if (RotationOffset != m_lastRotation ||
|
||||
Acceleration != m_lastAcceleration ||
|
||||
(Velocity - m_lastVelocity).Length() > VELOCITY_TOLERANCE ||
|
||||
(RotationalVelocity - m_lastAngularVelocity).Length() > VELOCITY_TOLERANCE ||
|
||||
(OffsetPosition - m_lastPosition).Length() > POSITION_TOLERANCE ||
|
||||
if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
|
||||
!Acceleration.Equals(m_lastAcceleration) ||
|
||||
!Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
|
||||
!RotationalVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
|
||||
!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
||||
Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
|
||||
{
|
||||
AddTerseUpdateToAllAvatars();
|
||||
|
||||
Reference in New Issue
Block a user