mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
If an avatar is sitting, send out position updates to clients for any change, not just those outside the usual tolerances.
This is to allow small adjustments of less than 0.05m in functions such as llSetPrimitiveLinkParams() to work This is another fix for http://opensimulator.org/mantis/view.php?id=7044 Extends regression test for this case.
This commit is contained in:
@@ -1495,7 +1495,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// Objects queue their updates onto all scene presences
|
||||
if (Frame % m_update_objects == 0)
|
||||
m_sceneGraph.UpdateObjectGroups();
|
||||
|
||||
|
||||
// Run through all ScenePresences looking for updates
|
||||
// Presence updates and queued object updates for each presence are sent to clients
|
||||
if (Frame % m_update_presences == 0)
|
||||
|
||||
@@ -3084,9 +3084,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (Appearance.AvatarSize != m_lastSize && !IsLoggingIn)
|
||||
SendAvatarDataToAllAgents();
|
||||
|
||||
if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
|
||||
!Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
|
||||
!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
|
||||
// Allow any updates for sitting avatars to that llSetPrimitiveLinkParams() can work for very
|
||||
// small increments (e.g. sit position adjusters). An alternative may be to eliminate the tolerance
|
||||
// checks on all updates but the ramifications of this would need careful consideration.
|
||||
bool updateClients
|
||||
= IsSatOnObject && (Rotation != m_lastRotation || Velocity != m_lastVelocity || m_pos != m_lastPosition);
|
||||
|
||||
if (!updateClients)
|
||||
updateClients
|
||||
= !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)
|
||||
|| !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE)
|
||||
|| !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE);
|
||||
|
||||
if (updateClients)
|
||||
{
|
||||
SendTerseUpdateToAllClients();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user