From c3a1d6b5ef2e889f53ff3b0c1b6b1002d6f9f6b8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 5 Oct 2014 18:55:37 +0100 Subject: [PATCH] reduce some avatar engine strenght --- .../Physics/UbitOdePlugin/ODECharacter.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs index f94e70b77d..af7ca1d475 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs @@ -928,7 +928,7 @@ namespace OpenSim.Region.Physics.OdePlugin IsColliding = true; } } - +/* if (contact.normal.Z < 0.2f) { contact.normal.Z = 0; @@ -940,6 +940,7 @@ namespace OpenSim.Region.Physics.OdePlugin contact.normal.Y *= t; } } + */ return true; } @@ -1203,8 +1204,8 @@ namespace OpenSim.Region.Physics.OdePlugin // Avatar to Avatar collisions // Prim to avatar collisions - vec.X = -vel.X * PID_D * 2 + (_zeroPosition.X - localpos.X) * (PID_P * 5); - vec.Y = -vel.Y * PID_D * 2 + (_zeroPosition.Y - localpos.Y) * (PID_P * 5); + vec.X = -vel.X * PID_D + (_zeroPosition.X - localpos.X) * (PID_P * 5); + vec.Y = -vel.Y * PID_D + (_zeroPosition.Y - localpos.Y) * (PID_P * 5); if (flying) { vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P; @@ -1225,7 +1226,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (ctz.Z > 0f) { // moving up or JUMPING - vec.Z += (ctz.Z - vel.Z) * PID_D * 1.2f;// +(_zeroPosition.Z - localpos.Z) * PID_P; + vec.Z += (ctz.Z - vel.Z) * PID_D; vec.X += (ctz.X - vel.X) * (PID_D); vec.Y += (ctz.Y - vel.Y) * (PID_D); } @@ -1235,7 +1236,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (ctz.Z == 0) { if (vel.Z > 0) - vec.Z -= vel.Z * PID_D * 2.0f; + vec.Z -= vel.Z * PID_D; vec.X += (ctz.X - vel.X) * (PID_D); vec.Y += (ctz.Y - vel.Y) * (PID_D); } @@ -1243,7 +1244,7 @@ namespace OpenSim.Region.Physics.OdePlugin else { if (ctz.Z < vel.Z) - vec.Z += (ctz.Z - vel.Z) * PID_D * 2.0f; + vec.Z += (ctz.Z - vel.Z) * PID_D; else { } @@ -1262,7 +1263,7 @@ namespace OpenSim.Region.Physics.OdePlugin // We're flying and colliding with something vec.X += (ctz.X - vel.X) * (PID_D * 0.0625f); vec.Y += (ctz.Y - vel.Y) * (PID_D * 0.0625f); - vec.Z += (ctz.Z - vel.Z) * (PID_D); + vec.Z += (ctz.Z - vel.Z) * (PID_D * 0.0625f); } } else // ie not colliding @@ -1270,8 +1271,8 @@ namespace OpenSim.Region.Physics.OdePlugin if (flying) //(!m_iscolliding && flying) { // we're in mid air suspended - vec.X += (ctz.X - vel.X) * (PID_D * 1.667f); - vec.Y += (ctz.Y - vel.Y) * (PID_D * 1.667f); + vec.X += (ctz.X - vel.X) * (PID_D); + vec.Y += (ctz.Y - vel.Y) * (PID_D); vec.Z += (ctz.Z - vel.Z) * (PID_D); }