summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/world/trace.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/game/world/trace.cpp b/src/game/world/trace.cpp
index 3207a3e..1d32afe 100644
--- a/src/game/world/trace.cpp
+++ b/src/game/world/trace.cpp
@@ -237,9 +237,8 @@ U8 bsp_trace_sweep_aabb_to_face(
F32 s0 = vec_dot( norm, trace->in_start ) - d;
F32 ndir = vec_dot( norm, dir );
- VEC3 dirn = vec_normalize( dir );
- F32 tdot = vec_dot( dirn, norm );
- if( !isnan( tdot ) && tdot >= 0 ) // dont collide with rear side
+ F32 tdot = vec_dot( dir, norm );
+ if( tdot >= 0 ) // dont collide with rear side
return 0;
if( fabsf( s0 ) <= radius + BSP_TRACE_EPSILON ) {
@@ -258,9 +257,6 @@ U8 bsp_trace_sweep_aabb_to_face(
}
}
- if( ndir > BSP_TRACE_EPSILON )
- return 0;
-
F32 t_enter = (-radius - s0) / ndir;
F32 t_exit = ( radius - s0) / ndir;
if( t_enter > t_exit ) { F32 tmp=t_enter; t_enter=t_exit; t_exit=tmp; }