Skip to content

Commit 18db37f

Browse files
committed
1 parent 6c48c37 commit 18db37f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/game/shared/gamemovement.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3330,7 +3330,14 @@ int CGameMovement::ClipVelocity( Vector& in, Vector& normal, Vector& out, float
33303330
{
33313331
// Redirect clipped velocity along angle of movement
33323332
float flLen = out.Length();
3333-
out *= ( -1.f * flBlocked * flRedirectCoeff + flLen ) / flLen;
3333+
#ifdef BDSBASE
3334+
if (flLen != 0.0f)
3335+
{
3336+
out *= (-1.f * flBlocked * flRedirectCoeff + flLen) / flLen;
3337+
}
3338+
#else
3339+
out *= (-1.f * flBlocked * flRedirectCoeff + flLen) / flLen;
3340+
#endif
33343341
}
33353342

33363343
// Return blocking flags.

0 commit comments

Comments
 (0)