about summary refs log tree commit diff
path: root/src/game/client/components/players.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/components/players.cpp')
-rw-r--r--src/game/client/components/players.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp
index 85c644ef..51ab8fad 100644
--- a/src/game/client/components/players.cpp
+++ b/src/game/client/components/players.cpp
@@ -198,8 +198,8 @@ void PLAYERS::render_player(
 
 	if (player.weapon == WEAPON_HAMMER)
 	{
-		float a = clamp((client_tick()-player.attacktick+ticktime)/10.0f, 0.0f, 1.0f);
-		state.add(&data->animations[ANIM_HAMMER_SWING], a, 1.0f);
+		float ct = (client_prevtick()-player.attacktick)/(float)SERVER_TICK_SPEED + client_ticktime();
+		state.add(&data->animations[ANIM_HAMMER_SWING], clamp(ct*5.0f,0.0f,1.0f), 1.0f);
 	}
 	if (player.weapon == WEAPON_NINJA)
 	{