diff options
Diffstat (limited to 'src/cgame/cg_buildable.c')
-rw-r--r-- | src/cgame/cg_buildable.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 4b7f4a2d..fd362f9d 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -472,10 +472,18 @@ CG_BuildableAnimation */ static void CG_BuildableAnimation( centity_t *cent, int *old, int *now, float *backLerp ) { + entityState_t *es = ¢->currentState; + //if no animation is set default to idle anim if( cent->buildableAnim == BANIM_NONE ) - cent->buildableAnim = cent->currentState.torsoAnim; + cent->buildableAnim = es->torsoAnim; + if( cent->oldBuildableAnim != es->legsAnim ) + { + if( cent->buildableAnim == es->torsoAnim || es->legsAnim & ANIM_TOGGLEBIT ) + cent->buildableAnim = cent->oldBuildableAnim = es->legsAnim; + } + CG_RunBuildableLerpFrame( cent ); *old = cent->lerpFrame.oldFrame; |