diff options
Diffstat (limited to 'src/game/client')
| -rw-r--r-- | src/game/client/components/players.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp index 816f0293..c0488d19 100644 --- a/src/game/client/components/players.cpp +++ b/src/game/client/components/players.cpp @@ -118,7 +118,6 @@ void PLAYERS::render_player( render_info.size = 64.0f; float intratick = client_intratick(); - float ticktime = client_ticktime(); if(player.health < 0) // dont render dead players return; @@ -203,8 +202,8 @@ void PLAYERS::render_player( } if (player.weapon == WEAPON_NINJA) { - float a = clamp((client_tick()-player.attacktick+ticktime)/40.0f, 0.0f, 1.0f); - state.add(&data->animations[ANIM_NINJA_SWING], a, 1.0f); + float ct = (client_prevtick()-player.attacktick)/(float)SERVER_TICK_SPEED + client_ticktime(); + state.add(&data->animations[ANIM_NINJA_SWING], clamp(ct*2.0f,0.0f,1.0f), 1.0f); } // do skidding |