From 61aea7311c2e1af78fd9da544499f2198f2da1dd Mon Sep 17 00:00:00 2001 From: aura Date: Wed, 4 Mar 2026 00:48:57 +0100 Subject: a --- src/game/world/trace.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/game/world/trace.cpp') 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; } -- cgit v1.2.3