]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_user.c
added more SV_CheckVelocity calls on players for safety sake
[xonotic/darkplaces.git] / sv_user.c
index 06ef02ead23551ec2911446549cb3ca1189c06b2..cc0a412ab6bb2ea54c91d991b0dd9b83ede62dd6 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -665,6 +665,15 @@ void SV_RunClients (void)
                        }
                        else
                                SV_ClientThink ();
+
+                       SV_CheckVelocity (sv_player);
+
+                       // LordHavoc: a hack to ensure that the (rather silly) id1 quakec
+                       // player_run/player_stand1 does not horribly malfunction if the
+                       // velocity becomes a number that is both == 0 and != 0
+                       // (sounds to me like NaN but to be absolutely safe...)
+                       if (DotProduct(sv_player->v->velocity, sv_player->v->velocity) < 0.0001)
+                               VectorClear(sv_player->v->velocity);
                }
        }
 }