about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-21 00:05:07 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-21 00:05:07 +0000
commit24899a13e8863e59027e993a61e9b2ef6787b74b (patch)
treeb12072e289b28395b63b677336815ec472479eb6 /src/game/client
parent30695c09a8fde8b88b8fa58427e0eb2293696e58 (diff)
downloadzcatch-24899a13e8863e59027e993a61e9b2ef6787b74b.tar.gz
zcatch-24899a13e8863e59027e993a61e9b2ef6787b74b.zip
improved the prediction timer to handle crappy connections better
Diffstat (limited to 'src/game/client')
-rw-r--r--src/game/client/components/controls.cpp2
-rw-r--r--src/game/client/components/players.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/game/client/components/controls.cpp b/src/game/client/components/controls.cpp
index 412dcf77..bdcea4d0 100644
--- a/src/game/client/components/controls.cpp
+++ b/src/game/client/components/controls.cpp
@@ -152,7 +152,7 @@ int CONTROLS::snapinput(int *data)
 		else if(input_data.prev_weapon != last_data.prev_weapon) send = true;
 
 		// send at at least 10hz
-		if(time_get() > last_send_time + time_freq()/10)
+		if(time_get() > last_send_time + time_freq()/25)
 			send = true;
 	}
 	
diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp
index b59e026a..f8e73dfb 100644
--- a/src/game/client/components/players.cpp
+++ b/src/game/client/components/players.cpp
@@ -123,9 +123,9 @@ void PLAYERS::render_player(
 	if(player.health < 0) // dont render dead players
 		return;
 
-	//float angle = mix((float)prev.angle, (float)player.angle, intratick)/256.0f;
+	float angle = mix((float)prev.angle, (float)player.angle, intratick)/256.0f;
 	
-	float angle = 0;
+	//float angle = 0;
 	
 	if(info.local && client_state() != CLIENTSTATE_DEMOPLAYBACK)
 	{
@@ -134,6 +134,7 @@ void PLAYERS::render_player(
 	}
 	else
 	{
+		/*
 		float mixspeed = client_frametime()*2.5f;
 		if(player.attacktick != prev.attacktick) // shooting boosts the mixing speed
 			mixspeed *= 15.0f;
@@ -151,7 +152,7 @@ void PLAYERS::render_player(
 		else
 			angle = angular_approach(current, target, fabs(delta-new_delta));
 
-		gameclient.clients[info.cid].angle = angle;
+		gameclient.clients[info.cid].angle = angle;*/
 	}
 	
 	// use preditect players if needed