From 338be76e0a5974b95db2618b8318b76f6fe3e8a4 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 15 May 2012 13:41:13 +0100 Subject: [PATCH] ubitODE: fix not reporting land collisions on same cases. --- .../Region/Physics/UbitOdePlugin/OdeScene.cs | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs index 7367719679..dd912da814 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs @@ -620,8 +620,6 @@ namespace OpenSim.Region.Physics.OdePlugin return d.JointCreateContactPtr(world, contactgroup, contact); } - - private bool GetCurContactGeom(int index, ref d.ContactGeom newcontactgeom) { if (ContactgeomsArray == IntPtr.Zero || index >= contactsPerCollision) @@ -1153,6 +1151,31 @@ namespace OpenSim.Region.Physics.OdePlugin } } break; + case ActorTypes.Ground: + case ActorTypes.Unknown: + default: + switch ((ActorTypes)p2.PhysicsActorType) + { + case ActorTypes.Agent: + if (p2 is OdeCharacter) + { + cc2 = (OdeCharacter)p2; + obj2LocalID = cc2.m_localID; + if (p2events) + cc2.AddCollisionEvent(0, contact); + } + break; + case ActorTypes.Prim: + if (p2 is OdePrim) + { + cp2 = (OdePrim)p2; + obj2LocalID = cp2.m_localID; + if (p2events) + cp2.AddCollisionEvent(0, contact); + } + break; + } + break; } }