* Adds a test for if the collision is at the bottom of the capsule on avatar. This prevents the 'double jump' capability that's been occurring for ages when avatar collide with prim on the side.

0.6.8-post-fixes
Teravus Ovares (Dan Olivares) 2009-11-22 22:04:52 -05:00
parent 9ba10af6b2
commit 21f80b6507
1 changed files with 12 additions and 1 deletions

View File

@ -835,7 +835,18 @@ namespace OpenSim.Region.Physics.OdePlugin
// allows us to have different settings // allows us to have different settings
// We only need to test p2 for 'jump crouch purposes' // We only need to test p2 for 'jump crouch purposes'
p2.IsColliding = true; if (p2 is OdeCharacter)
{
// Testing if the collision is at the feet of the avatar
//m_log.DebugFormat("[PHYSICS]: {0} - {1} - {2} - {3}", curContact.pos.Z, p2.Position.Z, (p2.Position.Z - curContact.pos.Z), (p2.Size.Z * 0.6f));
if ((p2.Position.Z - curContact.pos.Z) > (p2.Size.Z * 0.6f))
p2.IsColliding = true;
}
else
{
p2.IsColliding = true;
}
//if ((framecount % m_returncollisions) == 0) //if ((framecount % m_returncollisions) == 0)