summaryrefslogtreecommitdiff
path: root/src/cgame/cg_animation.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-03 11:37:35 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:11 +0000
commitbac576514472b4f1d70a53078182d29e93c34d59 (patch)
treeacb6f0056003701d26d9d1ed3fb48bb195187be3 /src/cgame/cg_animation.c
parentbcc79996c4c254a528e7b00f260d8ebd09e2a820 (diff)
* First person weapon animation
Diffstat (limited to 'src/cgame/cg_animation.c')
-rw-r--r--src/cgame/cg_animation.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cgame/cg_animation.c b/src/cgame/cg_animation.c
index c370c534..693cf6a7 100644
--- a/src/cgame/cg_animation.c
+++ b/src/cgame/cg_animation.c
@@ -31,7 +31,7 @@ Sets cg.snap, cg.oldFrame, and cg.backlerp
cg.time should be between oldFrameTime and frameTime after exit
===============
*/
-void CG_RunLerpFrame( lerpFrame_t *lf )
+void CG_RunLerpFrame( lerpFrame_t *lf, float scale )
{
int f, numFrames;
animation_t *anim;
@@ -61,7 +61,9 @@ void CG_RunLerpFrame( lerpFrame_t *lf )
lf->frameTime = lf->oldFrameTime + anim->frameLerp;
f = ( lf->frameTime - lf->animationTime ) / anim->frameLerp;
+ f *= scale;
numFrames = anim->numFrames;
+
if( anim->flipflop )
numFrames *= 2;