From a72d3522ff1c96ab4630fd23a4095eead4936033 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Wed, 31 Dec 2008 20:09:17 +0000 Subject: [PATCH] Slight optimisation: Don't check for duplication if we won't use the result anyway. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index a250a6a27c..f735f6001f 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -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