avatar collisions fix
parent
5cdd205ee7
commit
0239c7ba1c
|
@ -833,13 +833,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
switch (p2.PhysicsActorType)
|
||||
{
|
||||
case (int)ActorTypes.Agent:
|
||||
p1.CollidingObj = true;
|
||||
p2.CollidingObj = true;
|
||||
break;
|
||||
|
||||
case (int)ActorTypes.Prim:
|
||||
if (p2.Velocity.LengthSquared() > 0.0f)
|
||||
p2.CollidingObj = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -850,14 +844,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
|
||||
case (int)ActorTypes.Prim:
|
||||
{
|
||||
switch (p2.PhysicsActorType)
|
||||
{
|
||||
case (int)ActorTypes.Agent:
|
||||
|
||||
dop2ava = true;
|
||||
|
||||
if (p1.Velocity.LengthSquared() > 0.0f)
|
||||
p1.CollidingObj = true;
|
||||
break;
|
||||
|
||||
case (int)ActorTypes.Prim:
|
||||
|
@ -886,7 +877,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
if (Math.Abs(p1.Velocity.X) > 0.1f || Math.Abs(p1.Velocity.Y) > 0.1f)
|
||||
mu *= frictionMovementMult;
|
||||
p1.CollidingGround = true;
|
||||
/*
|
||||
/*
|
||||
if (d.GeomGetClass(g1) == d.GeomClassID.TriMeshClass)
|
||||
{
|
||||
if (curContact.side1 > 0)
|
||||
|
@ -900,6 +891,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
ignore = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case (int)ActorTypes.Ground:
|
||||
|
@ -950,14 +942,25 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
bool noskip = true;
|
||||
if (dop1ava)
|
||||
{
|
||||
if (!(((OdeCharacter)p1).Collide(g1,g2, false, ref curContact, ref FeetCollision)))
|
||||
|
||||
if (!(((OdeCharacter)p1).Collide(g1, g2, false, ref curContact, ref FeetCollision)))
|
||||
noskip = false;
|
||||
else
|
||||
{
|
||||
if(p2.PhysicsActorType == (int)ActorTypes.Agent)
|
||||
{
|
||||
p1.CollidingObj = true;
|
||||
p2.CollidingObj = true;
|
||||
}
|
||||
else if (p2.Velocity.LengthSquared() > 0.0f)
|
||||
p2.CollidingObj = true;
|
||||
}
|
||||
}
|
||||
else if (dop2ava)
|
||||
{
|
||||
if (!(((OdeCharacter)p2).Collide(g2,g1, true, ref curContact, ref FeetCollision)))
|
||||
noskip = false;
|
||||
else if (p1.Velocity.LengthSquared() > 0.0f)
|
||||
p1.CollidingObj = true;
|
||||
}
|
||||
|
||||
if (noskip)
|
||||
|
|
Loading…
Reference in New Issue