diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 079223d..af6f89c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2847,8 +2847,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2847 | float speed = Velocity.Length(); | 2847 | float speed = Velocity.Length(); |
2848 | float velocidyDiff = Vector3.Distance(lastVelocitySentToAllClients, Velocity); | 2848 | float velocidyDiff = Vector3.Distance(lastVelocitySentToAllClients, Velocity); |
2849 | 2849 | ||
2850 | // assuming 5 ms. worst case precision for timer, use 2x that | ||
2851 | // for distance error threshold | ||
2852 | float distanceErrorThreshold = speed * 0.01f; | ||
2853 | |||
2850 | if (speed < 0.01f // allow rotation updates if avatar position is unchanged | 2854 | if (speed < 0.01f // allow rotation updates if avatar position is unchanged |
2851 | || Math.Abs(distanceError) > 0.25f // arbitrary distance error threshold | 2855 | || Math.Abs(distanceError) > distanceErrorThreshold |
2852 | || velocidyDiff > 0.01f) // did velocity change from last update? | 2856 | || velocidyDiff > 0.01f) // did velocity change from last update? |
2853 | { | 2857 | { |
2854 | m_perfMonMS = currentTick; | 2858 | m_perfMonMS = currentTick; |
@@ -3568,7 +3572,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3568 | { | 3572 | { |
3569 | cAgent.AttachmentObjects = new List<ISceneObject>(); | 3573 | cAgent.AttachmentObjects = new List<ISceneObject>(); |
3570 | cAgent.AttachmentObjectStates = new List<string>(); | 3574 | cAgent.AttachmentObjectStates = new List<string>(); |
3571 | IScriptModule se = m_scene.RequestModuleInterface<IScriptModule>(); | 3575 | // IScriptModule se = m_scene.RequestModuleInterface<IScriptModule>(); |
3572 | m_InTransitScriptStates.Clear(); | 3576 | m_InTransitScriptStates.Clear(); |
3573 | foreach (SceneObjectGroup sog in m_attachments) | 3577 | foreach (SceneObjectGroup sog in m_attachments) |
3574 | { | 3578 | { |