mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
fixed the hammer so it looks good again and works like it should
This commit is contained in:
parent
8e0e105123
commit
e0358ee798
|
@ -198,8 +198,8 @@ void PLAYERS::render_player(
|
||||||
|
|
||||||
if (player.weapon == WEAPON_HAMMER)
|
if (player.weapon == WEAPON_HAMMER)
|
||||||
{
|
{
|
||||||
float a = clamp((client_tick()-player.attacktick+ticktime)/10.0f, 0.0f, 1.0f);
|
float ct = (client_prevtick()-player.attacktick)/(float)SERVER_TICK_SPEED + client_ticktime();
|
||||||
state.add(&data->animations[ANIM_HAMMER_SWING], a, 1.0f);
|
state.add(&data->animations[ANIM_HAMMER_SWING], clamp(ct*5.0f,0.0f,1.0f), 1.0f);
|
||||||
}
|
}
|
||||||
if (player.weapon == WEAPON_NINJA)
|
if (player.weapon == WEAPON_NINJA)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,6 +39,7 @@ MACRO_ALLOC_POOL_ID_IMPL(CHARACTER, MAX_CLIENTS)
|
||||||
CHARACTER::CHARACTER()
|
CHARACTER::CHARACTER()
|
||||||
: ENTITY(NETOBJTYPE_CHARACTER)
|
: ENTITY(NETOBJTYPE_CHARACTER)
|
||||||
{
|
{
|
||||||
|
proximity_radius = phys_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHARACTER::reset()
|
void CHARACTER::reset()
|
||||||
|
|
Loading…
Reference in a new issue