diff options
author | Justin Clark-Casey (justincc) | 2014-03-05 00:35:02 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-03-05 00:38:38 +0000 |
commit | c9415fd76378af35ff76037d46245f2b95e4264f (patch) | |
tree | 1ea2d0e4e183dd96a7b9533aaf5c166cf864e47b /OpenSim/Region/Framework/Scenes | |
parent | When positioning agent with PRIM_ROTATION in llSetLinkPrimitiveParams(), set ... (diff) | |
download | opensim-SC_OLD-c9415fd76378af35ff76037d46245f2b95e4264f.zip opensim-SC_OLD-c9415fd76378af35ff76037d46245f2b95e4264f.tar.gz opensim-SC_OLD-c9415fd76378af35ff76037d46245f2b95e4264f.tar.bz2 opensim-SC_OLD-c9415fd76378af35ff76037d46245f2b95e4264f.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f7fd767..fa90ef4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1495,7 +1495,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1495 | // Objects queue their updates onto all scene presences | 1495 | // Objects queue their updates onto all scene presences |
1496 | if (Frame % m_update_objects == 0) | 1496 | if (Frame % m_update_objects == 0) |
1497 | m_sceneGraph.UpdateObjectGroups(); | 1497 | m_sceneGraph.UpdateObjectGroups(); |
1498 | 1498 | ||
1499 | // Run through all ScenePresences looking for updates | 1499 | // Run through all ScenePresences looking for updates |
1500 | // Presence updates and queued object updates for each presence are sent to clients | 1500 | // Presence updates and queued object updates for each presence are sent to clients |
1501 | if (Frame % m_update_presences == 0) | 1501 | if (Frame % m_update_presences == 0) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d4af9fc..c8971c4 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3084,9 +3084,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
3084 | if (Appearance.AvatarSize != m_lastSize && !IsLoggingIn) | 3084 | if (Appearance.AvatarSize != m_lastSize && !IsLoggingIn) |
3085 | SendAvatarDataToAllAgents(); | 3085 | SendAvatarDataToAllAgents(); |
3086 | 3086 | ||
3087 | if (!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || | 3087 | // Allow any updates for sitting avatars to that llSetPrimitiveLinkParams() can work for very |
3088 | !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || | 3088 | // small increments (e.g. sit position adjusters). An alternative may be to eliminate the tolerance |
3089 | !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) | 3089 | // checks on all updates but the ramifications of this would need careful consideration. |
3090 | bool updateClients | ||
3091 | = IsSatOnObject && (Rotation != m_lastRotation || Velocity != m_lastVelocity || m_pos != m_lastPosition); | ||
3092 | |||
3093 | if (!updateClients) | ||
3094 | updateClients | ||
3095 | = !Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) | ||
3096 | || !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) | ||
3097 | || !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE); | ||
3098 | |||
3099 | if (updateClients) | ||
3090 | { | 3100 | { |
3091 | SendTerseUpdateToAllClients(); | 3101 | SendTerseUpdateToAllClients(); |
3092 | 3102 | ||