let old ODE trigger collision sounds like ubOde

LSLKeyTest
UbitUmarov 2015-11-28 23:44:53 +00:00
parent 9928076d1a
commit 82e464cb8c
2 changed files with 21 additions and 2 deletions

View File

@ -279,7 +279,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
public override bool IsPhysical
{
get { return false; }
get { return m_isPhysical; }
set { return; }
}

View File

@ -1442,9 +1442,28 @@ namespace OpenSim.Region.PhysicsModule.ODE
obj2LocalID = 0;
//ctype = 0;
//cStartStop = 0;
if (!p2.SubscribedEvents() && !p1.SubscribedEvents())
// if (!p2.SubscribedEvents() && !p1.SubscribedEvents())
// return;
bool p1events = p1.SubscribedEvents();
bool p2events = p2.SubscribedEvents();
if (p1.IsVolumeDtc)
p2events = false;
if (p2.IsVolumeDtc)
p1events = false;
if (!p2events && !p1events)
return;
Vector3 vel = Vector3.Zero;
if (p2 != null && p2.IsPhysical)
vel = p2.Velocity;
if (p1 != null && p1.IsPhysical)
vel -= p1.Velocity;
contact.RelativeSpeed = Vector3.Dot(vel, contact.SurfaceNormal);
switch ((ActorTypes)p2.PhysicsActorType)
{
case ActorTypes.Agent: