diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3996cdc..15fb11f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3409,7 +3409,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3409 | scene.AddPhysicsActorTaint(m_physicsActor); | 3409 | scene.AddPhysicsActorTaint(m_physicsActor); |
3410 | //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; | 3410 | //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; |
3411 | m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; | 3411 | m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; |
3412 | m_physicsActor.SubscribeEvents(1000); | 3412 | m_physicsActor.SubscribeEvents(500); |
3413 | m_physicsActor.LocalID = LocalId; | 3413 | m_physicsActor.LocalID = LocalId; |
3414 | 3414 | ||
3415 | } | 3415 | } |
@@ -3417,7 +3417,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
3417 | // Event called by the physics plugin to tell the avatar about a collision. | 3417 | // Event called by the physics plugin to tell the avatar about a collision. |
3418 | private void PhysicsCollisionUpdate(EventArgs e) | 3418 | private void PhysicsCollisionUpdate(EventArgs e) |
3419 | { | 3419 | { |
3420 | if ((e == null) || m_invulnerable) | 3420 | if (e == null) |
3421 | return; | ||
3422 | |||
3423 | //if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f)) | ||
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(); | ||
3427 | |||
3428 | if (m_invulnerable) | ||
3421 | return; | 3429 | return; |
3422 | CollisionEventUpdate collisionData = (CollisionEventUpdate)e; | 3430 | CollisionEventUpdate collisionData = (CollisionEventUpdate)e; |
3423 | Dictionary<uint, float> coldata = collisionData.m_objCollisionList; | 3431 | Dictionary<uint, float> coldata = collisionData.m_objCollisionList; |
@@ -3455,8 +3463,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3455 | m_scene.EventManager.TriggerAvatarKill(killerObj, this); | 3463 | m_scene.EventManager.TriggerAvatarKill(killerObj, this); |
3456 | } | 3464 | } |
3457 | 3465 | ||
3458 | if (Velocity.X > 0 || Velocity.Y > 0) | 3466 | |
3459 | UpdateMovementAnimations(); | ||
3460 | } | 3467 | } |
3461 | 3468 | ||
3462 | public void setHealthWithUpdate(float health) | 3469 | public void setHealthWithUpdate(float health) |