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/ScenePresence.cs | |
parent | When positioning agent with PRIM_ROTATION in llSetLinkPrimitiveParams(), set ... (diff) | |
download | opensim-SC-c9415fd76378af35ff76037d46245f2b95e4264f.zip opensim-SC-c9415fd76378af35ff76037d46245f2b95e4264f.tar.gz opensim-SC-c9415fd76378af35ff76037d46245f2b95e4264f.tar.bz2 opensim-SC-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/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 16 |
1 files changed, 13 insertions, 3 deletions
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 | ||