From e0358ee798560f7ca689577227fe7cd86342b9de Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 18 Oct 2008 11:03:33 +0000 Subject: [PATCH] fixed the hammer so it looks good again and works like it should --- src/game/client/components/players.cpp | 4 ++-- src/game/server/entities/character.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp index 85c644efe..51ab8fad8 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) { diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 2ba272148..18db9e3b8 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -39,6 +39,7 @@ MACRO_ALLOC_POOL_ID_IMPL(CHARACTER, MAX_CLIENTS) CHARACTER::CHARACTER() : ENTITY(NETOBJTYPE_CHARACTER) { + proximity_radius = phys_size; } void CHARACTER::reset()