diff options
| author | aura <nw@moneybot.cc> | 2026-02-25 14:45:28 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-25 14:45:28 +0100 |
| commit | b384930de5044934207d1b2ceb4fa55705094f8b (patch) | |
| tree | 7937d3382e83ead2db1851b4a02b8378d02ac150 /src/game/world | |
| parent | cabe4471c309b2bba3be78b8346c9007485b1d57 (diff) | |
movement stuff + fix map zoom when dragging
Diffstat (limited to 'src/game/world')
| -rw-r--r-- | src/game/world/trace.cpp | 3 | ||||
| -rw-r--r-- | src/game/world/trace.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/game/world/trace.cpp b/src/game/world/trace.cpp index 43f5f68..fd6a03b 100644 --- a/src/game/world/trace.cpp +++ b/src/game/world/trace.cpp @@ -165,6 +165,7 @@ U8 bsp_trace( BSP_TRACE* trace, BSP* bsp ) { } trace->hit = 0; + trace->startsolid = 0; bsp_trace_nudge( trace ); VEC3 start = trace->in_start; @@ -237,6 +238,7 @@ U8 bsp_trace_sweep_aabb_to_face( if( point_in_inflated_poly( start, face, hull, norm ) ) { trace->hit = 1; trace->frac = 0.f; + trace->startsolid = 1; trace->point = start; trace->normal = norm; trace->propid = face->propid; @@ -375,6 +377,7 @@ U8 bsp_trace( BSP_TRACE* trace, BSP* bsp, AABB hull ) { if( !trace || !bsp ) return 0; + trace->startsolid = 0; trace->hit = 0; bsp_trace_nudge( trace ); VEC3 start = trace->in_start; diff --git a/src/game/world/trace.h b/src/game/world/trace.h index 8a0f4eb..717fc8f 100644 --- a/src/game/world/trace.h +++ b/src/game/world/trace.h @@ -17,6 +17,7 @@ struct BSP_TRACE { U32 propid; I32 leafid; U32 faceid; + U8 startsolid; }; extern U8 bsp_trace( BSP_TRACE* trace, BSP* bsp ); |
