From 81828c9b145c1d5da36559c32559cf89d414287b Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 15 Dec 2007 05:08:08 +0000 Subject: * Added an Avatar control tweak that disables the PID controller in certain circumstances. * This allows collisions with other avatar and prim with a velocity greater then 0 to push avatar around. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin/OdePlugin.cs') diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index a765878..0cbd4d6 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -127,7 +127,7 @@ namespace OpenSim.Region.Physics.OdePlugin contact.surface.bounce = 0.2f; TerrainContact.surface.mode |= d.ContactFlags.SoftERP; - TerrainContact.surface.mu = 250.0f; + TerrainContact.surface.mu = 550.0f; TerrainContact.surface.bounce = 0.1f; TerrainContact.surface.soft_erp = 0.1025f; @@ -255,7 +255,7 @@ namespace OpenSim.Region.Physics.OdePlugin PhysicsActor p1; PhysicsActor p2; - if (!actor_name_map.TryGetValue(g2, out p1)) + if (!actor_name_map.TryGetValue(g1, out p1)) { p1 = PANull; } @@ -267,16 +267,22 @@ namespace OpenSim.Region.Physics.OdePlugin // We only need to test p2 for 'jump crouch purposes' p2.IsColliding = true; + + switch(p1.PhysicsActorType) { case (int)ActorTypes.Agent: p2.CollidingObj = true; break; case (int)ActorTypes.Prim: - p2.CollidingObj = true; + if (p2.Velocity.X >0 || p2.Velocity.Y > 0 || p2.Velocity.Z > 0) + p2.CollidingObj = true; break; case (int)ActorTypes.Unknown: p2.CollidingGround = true; break; + default: + p2.CollidingGround = true; + break; } if (name1 == "Terrain" || name2 == "Terrain") -- cgit v1.1