コード例 #1
0
/*
===============
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;
	}
}
コード例 #2
0
ファイル: ui_players.c プロジェクト: SHOVELL/Unvanquished
/*
===============
UI_LegsSequencing
===============
*/
static void UI_LegsSequencing( playerInfo_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 );
		pi->legsAnimationTimer = UI_TIMER_LAND;
		jumpHeight = 0;
		return;
	}

	if ( currentAnim == LEGS_LAND )
	{
		UI_SetLegsAnim( pi, LEGS_IDLE );
		return;
	}
}
コード例 #3
0
/*
===============
UI_LegsSequencing
===============
*/
static void UI_LegsSequencing( playerInfo_t *pi ) {
	int		currentAnim;

	currentAnim = pi->legsAnim & ~ANIM_TOGGLEBIT;

	if ( pi->legsAnimationTimer > 0 ) {
		if ( currentAnim == BOTH_JUMP1 ) {
			jumpHeight = JUMP_HEIGHT * sin( M_PI * ( UI_TIMER_JUMP - pi->legsAnimationTimer ) / UI_TIMER_JUMP );
		}
		return;
	}

	if ( currentAnim == BOTH_JUMP1 ) {
		UI_ForceLegsAnim( pi, BOTH_LAND1 );
		pi->legsAnimationTimer = UI_TIMER_LAND;
		jumpHeight = 0;
		return;
	}

	if ( currentAnim == BOTH_LAND1 ) {
		UI_SetLegsAnim( pi, TORSO_WEAPONREADY3 );
		return;
	}
}