about summary refs log tree commit diff
path: root/src/game/client/gc_client.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-16 13:32:59 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-16 13:32:59 +0000
commitfdc4889768f0275a0d43ae17346958d9f9fa3c43 (patch)
tree39116efce5490902c4868642248d44b5e6cc4ccc /src/game/client/gc_client.cpp
parent6285917917537b51c9dedcad1780a7f9b1193174 (diff)
downloadzcatch-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.cpp6
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();
 		}