summaryrefslogtreecommitdiff
path: root/src/cgame/cg_buildable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame/cg_buildable.c')
-rw-r--r--src/cgame/cg_buildable.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c
index 4c1db197..86353f12 100644
--- a/src/cgame/cg_buildable.c
+++ b/src/cgame/cg_buildable.c
@@ -340,7 +340,6 @@ static void CG_SetBuildableLerpFrameAnimation( buildable_t buildable, lerpFrame_
animation_t *anim;
lf->animationNumber = newAnimation;
- newAnimation &= ~( ANIM_TOGGLEBIT|ANIM_FORCEBIT );
if( newAnimation < 0 || newAnimation >= MAX_BUILDABLE_ANIMATIONS )
CG_Error( "Bad animation number: %i", newAnimation );
@@ -373,6 +372,8 @@ static void CG_RunBuildableLerpFrame( centity_t *cent )
lerpFrame_t *lf = &cent->lerpFrame;
animation_t *anim;
buildableAnimNumber_t newAnimation = cent->buildableAnim;
+
+ newAnimation &= ~( ANIM_TOGGLEBIT|ANIM_FORCEBIT );
// debugging tool to get no animations
if( cg_animSpeed.integer == 0 )
@@ -386,6 +387,9 @@ static void CG_RunBuildableLerpFrame( centity_t *cent )
{
CG_SetBuildableLerpFrameAnimation( buildable, lf, newAnimation );
+ CG_Printf( "new anim/sound: %d %d\n", !cg_buildables[ buildable ].sounds[ newAnimation ].looped,
+ cg_buildables[ buildable ].sounds[ newAnimation ].enabled );
+
if( !cg_buildables[ buildable ].sounds[ newAnimation ].looped &&
cg_buildables[ buildable ].sounds[ newAnimation ].enabled )
trap_S_StartSound( cent->lerpOrigin, cent->currentState.number, CHAN_AUTO,