diff options
| author | aura <nw@moneybot.cc> | 2026-03-04 00:48:57 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-03-04 00:48:57 +0100 |
| commit | 61aea7311c2e1af78fd9da544499f2198f2da1dd (patch) | |
| tree | 2b2ca30b7913638725e8bd60a1a7a8717100e59d /src/game/world | |
| parent | 88f960570aed4e12046d8a3c0924129d4fbd96a8 (diff) | |
a
Diffstat (limited to 'src/game/world')
| -rw-r--r-- | src/game/world/trace.cpp | 8 |
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; } |
