From 8f978c8bc5b9ab17316cdc01caaee9b9d62d683e Mon Sep 17 00:00:00 2001 From: navewindre Date: Thu, 2 Oct 2025 06:26:57 +0200 Subject: fix2 --- src/game/player.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/game/player.cpp b/src/game/player.cpp index 26c03af..c4b9c9a 100644 --- a/src/game/player.cpp +++ b/src/game/player.cpp @@ -147,6 +147,15 @@ void player_move( GAME_DATA* game, PLAYER* p ) { p->pos += wishmove; else { p->pos += wishmove * tr.frac; + + + // TODO: clipvelocity fixes this, clips velocity to 1 wall (should do 4) + VEC3 left = wishmove * (1.f - tr.frac); + F32 into = vec_dot( left, tr.normal ); + if( into < 0.f ) + left -= tr.normal * into; + + p->pos += left; } } } -- cgit v1.2.3