From 2fec95c41447c60ceac4e619a3a18a2de8d324ed Mon Sep 17 00:00:00 2001 From: Jonathan Barkley Date: Tue, 12 Apr 2011 16:01:18 +0000 Subject: [PATCH] - Slight modification in the weapon animation code; rather than always resetting oldFrame on new animation, only do it on activation. I didn't like the jerkiness on animations :) --- reaction/code/cgame/cg_players.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reaction/code/cgame/cg_players.c b/reaction/code/cgame/cg_players.c index a1d1329e..e480c7e2 100644 --- a/reaction/code/cgame/cg_players.c +++ b/reaction/code/cgame/cg_players.c @@ -1341,8 +1341,11 @@ static void CG_SetWeaponLerpFrame(clientInfo_t * ci, lerpFrame_t * lf, int newAn //CG_Printf( "Snap Weapon: %i\n", cg.snap->ps.weapon); //CG_Printf( "Desired Weapon: %i\n", cg.weaponSelect); } + //Elder: reset frame so there is no lerping between new animations - lf->oldFrame = lf->frame = lf->animation->firstFrame; + // Paril: Only do this if the new animation is activation. It looked too jerky. + if (newAnimation == WP_ANIM_ACTIVATE) + lf->oldFrame = lf->frame = lf->animation->firstFrame; }