From fdc4889768f0275a0d43ae17346958d9f9fa3c43 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 16 Dec 2007 13:32:59 +0000 Subject: fixed clamping of insane moves --- src/game/client/gc_client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game/client/gc_client.cpp') diff --git a/src/game/client/gc_client.cpp b/src/game/client/gc_client.cpp index c1f71f59..03b3a24c 100644 --- a/src/game/client/gc_client.cpp +++ b/src/game/client/gc_client.cpp @@ -784,6 +784,12 @@ extern "C" void modc_predict() if(!world.players[c]) continue; + + // TODO: this should be moved into the g_game + // but not done to preserve the nethash + if(length(world.players[c]->vel) > 150.0f) + world.players[c]->vel = normalize(world.players[c]->vel) * 150.0f; + world.players[c]->move(); world.players[c]->quantize(); } -- cgit 1.4.1