diff options
author | Melanie | 2011-05-08 20:20:40 +0100 |
---|---|---|
committer | Melanie | 2011-05-08 20:20:40 +0100 |
commit | 1be67914fab348115faa1fc9e9ecffbf7c303093 (patch) | |
tree | 7ad4917efae6aebeefa51fe03b1d1aac3e95efcb /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Enable compressed (gzip) fatpack transfers. (diff) | |
parent | Mantis #5472 (diff) | |
download | opensim-SC_OLD-1be67914fab348115faa1fc9e9ecffbf7c303093.zip opensim-SC_OLD-1be67914fab348115faa1fc9e9ecffbf7c303093.tar.gz opensim-SC_OLD-1be67914fab348115faa1fc9e9ecffbf7c303093.tar.bz2 opensim-SC_OLD-1be67914fab348115faa1fc9e9ecffbf7c303093.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
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 631c91b..f6295b1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2430,8 +2430,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2430 | float speed = Velocity.Length(); | 2430 | float speed = Velocity.Length(); |
2431 | float velocidyDiff = Vector3.Distance(lastVelocitySentToAllClients, Velocity); | 2431 | float velocidyDiff = Vector3.Distance(lastVelocitySentToAllClients, Velocity); |
2432 | 2432 | ||
2433 | // assuming 5 ms. worst case precision for timer, use 2x that | ||
2434 | // for distance error threshold | ||
2435 | float distanceErrorThreshold = speed * 0.01f; | ||
2436 | |||
2433 | if (speed < 0.01f // allow rotation updates if avatar position is unchanged | 2437 | if (speed < 0.01f // allow rotation updates if avatar position is unchanged |
2434 | || Math.Abs(distanceError) > 0.25f // arbitrary distance error threshold | 2438 | || Math.Abs(distanceError) > distanceErrorThreshold |
2435 | || velocidyDiff > 0.01f) // did velocity change from last update? | 2439 | || velocidyDiff > 0.01f) // did velocity change from last update? |
2436 | { | 2440 | { |
2437 | m_perfMonMS = currentTick; | 2441 | m_perfMonMS = currentTick; |
@@ -3151,7 +3155,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3151 | { | 3155 | { |
3152 | cAgent.AttachmentObjects = new List<ISceneObject>(); | 3156 | cAgent.AttachmentObjects = new List<ISceneObject>(); |
3153 | cAgent.AttachmentObjectStates = new List<string>(); | 3157 | cAgent.AttachmentObjectStates = new List<string>(); |
3154 | IScriptModule se = m_scene.RequestModuleInterface<IScriptModule>(); | 3158 | // IScriptModule se = m_scene.RequestModuleInterface<IScriptModule>(); |
3155 | m_InTransitScriptStates.Clear(); | 3159 | m_InTransitScriptStates.Clear(); |
3156 | foreach (SceneObjectGroup sog in m_attachments) | 3160 | foreach (SceneObjectGroup sog in m_attachments) |
3157 | { | 3161 | { |