aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon/cm_patch.c
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-07-27 21:52:31 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-07-27 21:52:31 +0000
commit81367544d5b547642fdeaacb469ad4f59e82ab37 (patch)
treea2b310e88f67e2e02720ce570514dd4fce14e892 /code/qcommon/cm_patch.c
parentd6e4128e9f2ca4f71fa1612c45f84bc45b82a5a2 (diff)
downloadioquake3-aero-81367544d5b547642fdeaacb469ad4f59e82ab37.tar.gz
ioquake3-aero-81367544d5b547642fdeaacb469ad4f59e82ab37.zip
* Early out AABB collision optimisation from Robert Beckebans (Xreal)
git-svn-id: svn://svn.icculus.org/quake3/trunk@1121 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon/cm_patch.c')
-rw-r--r--code/qcommon/cm_patch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/code/qcommon/cm_patch.c b/code/qcommon/cm_patch.c
index 88e3697..176aac1 100644
--- a/code/qcommon/cm_patch.c
+++ b/code/qcommon/cm_patch.c
@@ -1386,6 +1386,11 @@ void CM_TraceThroughPatchCollide( traceWork_t *tw, const struct patchCollide_s *
static cvar_t *cv;
#endif //BSPC
+ if ( !BoundsIntersect( tw->bounds[0], tw->bounds[1],
+ pc->bounds[0], pc->bounds[1] ) ) {
+ return;
+ }
+
if (tw->isPoint) {
CM_TracePointThroughPatchCollide( tw, pc );
return;