Slight optimisation: Don't check for duplication if we won't use the result anyway.

0.6.2-post-fixes
Homer Horwitz 2008-12-31 20:09:17 +00:00
parent 4b760bba79
commit a72d3522ff
1 changed files with 7 additions and 7 deletions

View File

@ -817,18 +817,18 @@ namespace OpenSim.Region.Physics.OdePlugin
// appears to be phantom for the world
Boolean skipThisContact = false;
if (contacts[i].depth < 0f)
skipThisContact = true;
if (checkDupe(contacts[i], p2.PhysicsActorType))
skipThisContact = true;
if ((p1 is OdePrim) && (((OdePrim)p1).m_isVolumeDetect))
skipThisContact = true; // No collision on volume detect prims
if ((p2 is OdePrim) && (((OdePrim)p2).m_isVolumeDetect))
if (!skipThisContact && (p2 is OdePrim) && (((OdePrim)p2).m_isVolumeDetect))
skipThisContact = true; // No collision on volume detect prims
if (!skipThisContact && contacts[i].depth < 0f)
skipThisContact = true;
if (!skipThisContact && checkDupe(contacts[i], p2.PhysicsActorType))
skipThisContact = true;
if (!skipThisContact)
{
// If we're colliding against terrain