diff options
author | Justin Clark-Casey (justincc) | 2012-06-01 04:07:39 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-01 04:07:39 +0100 |
commit | 4e06a46dc5e6d0fb6a894932e706e4a01351ec64 (patch) | |
tree | 111ee8d942959b32b25f33d65b897278d9d9379f /OpenSim/Region/Physics | |
parent | Add optional stat for the other collision time per frame not spent in ODE nat... (diff) | |
download | opensim-SC_OLD-4e06a46dc5e6d0fb6a894932e706e4a01351ec64.zip opensim-SC_OLD-4e06a46dc5e6d0fb6a894932e706e4a01351ec64.tar.gz opensim-SC_OLD-4e06a46dc5e6d0fb6a894932e706e4a01351ec64.tar.bz2 opensim-SC_OLD-4e06a46dc5e6d0fb6a894932e706e4a01351ec64.tar.xz |
If OdeScene.Near() returns no collision contacts, then exit as early as possible. All subsequent code is only relevant if there are contacts.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 8590453..c26c9c5 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -1025,6 +1025,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1025 | 1025 | ||
1026 | count = CollideGeoms(g1, g2, contacts.Length, contacts, d.ContactGeom.SizeOf); | 1026 | count = CollideGeoms(g1, g2, contacts.Length, contacts, d.ContactGeom.SizeOf); |
1027 | 1027 | ||
1028 | // All code after this is only relevant if we have any collisions | ||
1029 | if (count <= 0) | ||
1030 | return; | ||
1031 | |||
1028 | if (count > contacts.Length) | 1032 | if (count > contacts.Length) |
1029 | m_log.Error("[ODE SCENE]: Got " + count + " contacts when we asked for a maximum of " + contacts.Length); | 1033 | m_log.Error("[ODE SCENE]: Got " + count + " contacts when we asked for a maximum of " + contacts.Length); |
1030 | } | 1034 | } |