diff options
author | Teravus Ovares (Dan Olivares) | 2009-10-10 04:01:36 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-10-10 04:01:36 -0400 |
commit | 8271528b1fe49d99cf5b64d3644864ba4aa097c1 (patch) | |
tree | aed5d2f4985f68e9e20d26c8758bef740a8a57e4 /OpenSim/Region | |
parent | Merge branch 'master' of ssh://MyConnection/var/git/opensim (diff) | |
download | opensim-SC_OLD-8271528b1fe49d99cf5b64d3644864ba4aa097c1.zip opensim-SC_OLD-8271528b1fe49d99cf5b64d3644864ba4aa097c1.tar.gz opensim-SC_OLD-8271528b1fe49d99cf5b64d3644864ba4aa097c1.tar.bz2 opensim-SC_OLD-8271528b1fe49d99cf5b64d3644864ba4aa097c1.tar.xz |
* comment out the velocity test, using updates every 500 ms as set in ScenePresence.AddToPhysicalScene.
* This causes time to be counted in ODECharacter and, when a collision occurs, the physics scene will report the collisions only if the the difference of last time it reported the collisions from now was more then the set ms.
* This is cool because the time accrues while collisions are not taking place and when they do take place again, you get an immediate update.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index e20b8f2..15fb11f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3420,8 +3420,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3420 | if (e == null) | 3420 | if (e == null) |
3421 | return; | 3421 | return; |
3422 | 3422 | ||
3423 | if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f)) | 3423 | //if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f)) |
3424 | UpdateMovementAnimations(); | 3424 | // The Physics Scene will send updates every 500 ms grep: m_physicsActor.SubscribeEvents( |
3425 | // as of this comment the interval is set in AddToPhysicalScene | ||
3426 | UpdateMovementAnimations(); | ||
3425 | 3427 | ||
3426 | if (m_invulnerable) | 3428 | if (m_invulnerable) |
3427 | return; | 3429 | return; |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 7a86b6e..bd81d50 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -1318,6 +1318,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1318 | 1318 | ||
1319 | internal void AddCollisionFrameTime(int p) | 1319 | internal void AddCollisionFrameTime(int p) |
1320 | { | 1320 | { |
1321 | // protect it from overflow crashing | ||
1322 | if (m_eventsubscription + p >= int.MaxValue) | ||
1323 | m_eventsubscription = 0; | ||
1321 | m_eventsubscription += p; | 1324 | m_eventsubscription += p; |
1322 | } | 1325 | } |
1323 | } | 1326 | } |