diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-12-16 13:32:59 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-12-16 13:32:59 +0000 |
| commit | fdc4889768f0275a0d43ae17346958d9f9fa3c43 (patch) | |
| tree | 39116efce5490902c4868642248d44b5e6cc4ccc /src/game/client/gc_client.cpp | |
| parent | 6285917917537b51c9dedcad1780a7f9b1193174 (diff) | |
| download | zcatch-fdc4889768f0275a0d43ae17346958d9f9fa3c43.tar.gz zcatch-fdc4889768f0275a0d43ae17346958d9f9fa3c43.zip | |
fixed clamping of insane moves
Diffstat (limited to 'src/game/client/gc_client.cpp')
| -rw-r--r-- | src/game/client/gc_client.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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(); } |