/* =============== UI_LegsSequencing =============== */ static void UI_LegsSequencing( uiPlayerInfo_t *pi ) { int currentAnim; currentAnim = pi->legsAnim & ~ANIM_TOGGLEBIT; if ( pi->legsAnimationTimer > 0 ) { if ( currentAnim == LEGS_JUMP ) { jumpHeight = JUMP_HEIGHT * sin( M_PI * ( UI_TIMER_JUMP - pi->legsAnimationTimer ) / UI_TIMER_JUMP ); } return; } if ( currentAnim == LEGS_JUMP ) { UI_ForceLegsAnim( pi, LEGS_LAND ); #ifdef TA_PLAYERSYS // PLAYERCFG_ANIMATION_TIMES pi->legsAnimationTimer = BG_AnimationTime(&pi->playercfg.animations[LEGS_LAND]); #else pi->legsAnimationTimer = UI_TIMER_LAND; #endif jumpHeight = 0; return; } if ( currentAnim == LEGS_LAND ) { #ifdef TA_WEAPSYS UI_SetLegsAnim( pi, BG_LegsStandForWeapon(&pi->playercfg, pi->realWeapon) ); #else UI_SetLegsAnim( pi, LEGS_IDLE ); #endif return; } }
/* =============== UI_ForceTorsoAnim =============== */ static void UI_ForceTorsoAnim( uiPlayerInfo_t *pi, int anim ) { pi->torsoAnim = ( ( pi->torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) | anim; if ( anim == TORSO_GESTURE ) { #ifdef TA_PLAYERSYS // PLAYERCFG_ANIMATION_TIMES pi->torsoAnimationTimer = BG_AnimationTime(&pi->playercfg.animations[anim]); #else pi->torsoAnimationTimer = UI_TIMER_GESTURE; #endif } #ifdef TA_WEAPSYS if (BG_PlayerAttackAnim(anim)) #else if ( anim == TORSO_ATTACK || anim == TORSO_ATTACK2 ) #endif { #ifdef TA_PLAYERSYS // PLAYERCFG_ANIMATION_TIMES pi->torsoAnimationTimer = BG_AnimationTime(&pi->playercfg.animations[anim]); #else pi->torsoAnimationTimer = UI_TIMER_ATTACK; #endif } }
static void CelebrateStart( gentity_t *player ) { player->s.torsoAnim = ( ( player->s.torsoAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) | TORSO_GESTURE; #ifdef TA_PLAYERSYS // PLAYERCFG_ANIMATION_TIMES player->nextthink = level.time + BG_AnimationTime(&player->player->pers.playercfg.animations[TORSO_GESTURE]); #else player->nextthink = level.time + TIMER_GESTURE; #endif player->think = CelebrateStop; /* player->player->ps.events[player->player->ps.eventSequence & (MAX_PS_EVENTS-1)] = EV_TAUNT; player->player->ps.eventParms[player->player->ps.eventSequence & (MAX_PS_EVENTS-1)] = 0; player->player->ps.eventSequence++; */ G_AddEvent(player, EV_TAUNT, 0); }