summaryrefslogtreecommitdiff
path: root/src/game/physics/movement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/physics/movement.cpp')
-rw-r--r--src/game/physics/movement.cpp8
1 files changed, 1 insertions, 7 deletions
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;
}