From f3a920237b479149537f39d203c824571123d032 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 2 Jul 2017 01:34:06 +0100 Subject: oops i forgot the avatar knees bending on ramps... so go back.. --- OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs') diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index 0837bfb..844d02b 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs @@ -951,7 +951,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde SharedTmpcontact.surface.mu = mu; SharedTmpcontact.surface.bounce = bounce; - bool noskip = true; + d.ContactGeom altContact = new d.ContactGeom(); + bool useAltcontact; + bool noskip; if(dop1ava || dop2ava) smoothMesh = false; @@ -959,10 +961,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde while (true) { noskip = true; + useAltcontact = false; if (dop1ava) { - if ((((OdeCharacter)p1).Collide(g1, g2, false, ref curContact, ref FeetCollision))) + if ((((OdeCharacter)p1).Collide(g1, g2, false, ref curContact, ref altContact , ref useAltcontact, ref FeetCollision))) { if (p2.PhysicsActorType == (int)ActorTypes.Agent) { @@ -977,7 +980,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde } else if (dop2ava) { - if ((((OdeCharacter)p2).Collide(g2, g1, true, ref curContact, ref FeetCollision))) + if ((((OdeCharacter)p2).Collide(g2, g1, true, ref curContact, ref altContact , ref useAltcontact, ref FeetCollision))) { if (p1.PhysicsActorType == (int)ActorTypes.Agent) { @@ -993,8 +996,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde if (noskip) { - Joint = CreateContacJoint(ref curContact,smoothMesh); - + if(useAltcontact) + Joint = CreateContacJoint(ref altContact,smoothMesh); + else + Joint = CreateContacJoint(ref curContact,smoothMesh); if (Joint == IntPtr.Zero) break; -- cgit v1.1