mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed ninja animation
This commit is contained in:
parent
8d78151d0a
commit
d3f7de62f1
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue