From a9da2786cf5a1d6d75aac713aa9b354d94e7afc6 Mon Sep 17 00:00:00 2001 From: "Teravus Ovares (Dan Olivares)" Date: Sat, 10 Oct 2009 01:49:06 -0400 Subject: [PATCH] * Fix incorrect math on the Velocity check in PhysicsCollisionUpdate. This may reduce avatar flailing. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6772f75d60..ac6fe9483f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3390,8 +3390,15 @@ namespace OpenSim.Region.Framework.Scenes // Event called by the physics plugin to tell the avatar about a collision. private void PhysicsCollisionUpdate(EventArgs e) { - if ((e == null) || m_invulnerable) + if (e == null) return; + + if ((Math.Abs(Velocity.X) > 0.05f) || (Math.Abs(Velocity.Y) > 0.05f)) + UpdateMovementAnimations(); + + if (m_invulnerable) + return; + CollisionEventUpdate collisionData = (CollisionEventUpdate)e; Dictionary coldata = collisionData.m_objCollisionList; float starthealth = Health;