From 7466c0415415052cda55f02befb720d2a348b6c9 Mon Sep 17 00:00:00 2001 From: aura Date: Tue, 3 Mar 2026 23:35:50 +0100 Subject: smoother walls --- src/game/physics/movement.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/game/physics/movement.cpp') diff --git a/src/game/physics/movement.cpp b/src/game/physics/movement.cpp index b2b2ffa..61b1cc4 100644 --- a/src/game/physics/movement.cpp +++ b/src/game/physics/movement.cpp @@ -257,7 +257,7 @@ F32 gmove_try_move( BSP_TRACE* t, VEC3* pos, VEC3* vel ) { F32 dot = vec_dot( *vel, t->normal ); *pos += wishmove * t->frac; // nudge player away from wall - *pos += t->normal * BSP_TRACE_EPSILON * 2.f; + *pos += t->normal * BSP_TRACE_EPSILON; // avoid clipping planes twice // in a rare edge case its possible to get stuck in the plane again after pushing away from it @@ -435,14 +435,11 @@ void gmove_step_move( VEC3 dest, BSP_TRACE* tr ) { VEC3 up = pos, down = pos; VEC3 upvel = vel, downvel = vel; - F32 groundn = 0.f; if( gmove->ground ) { VEC3 ground = pos; ground.z += 2.f; bsp_trace( tr, gmove->bsp, gmove->aabb, pos, ground ); - if( tr->hit ) - groundn = tr->normal.z; } // try moving forward first @@ -504,9 +501,6 @@ void gmove_step_move( VEC3 dest, BSP_TRACE* tr ) { gmove->pos += delta; if( tr->normal.z < 0.99f ) gmove->pos += tr->normal * BSP_TRACE_EPSILON * 2.f; - // hack : moving to a steeper slope, move up a bit to avoid getting stuck in the edge - if( gmove->ground && tr->normal.z < groundn ) - gmove->pos.z += BSP_TRACE_EPSILON; gmove->velocity = upvel; gmove->velocity.z = downvel.z; } -- cgit v1.2.3