Example #1
0
/*
===============
UI_PlayerAnimation
===============
*/
static void UI_PlayerAnimation( playerInfo_t *pi, int *legsOld, int *legs, float *legsBackLerp,
                                int *torsoOld, int *torso, float *torsoBackLerp ) {

    // legs animation
    pi->legsAnimationTimer -= uiInfo.uiDC.frameTime;
    if ( pi->legsAnimationTimer < 0 ) {
        pi->legsAnimationTimer = 0;
    }

    UI_LegsSequencing( pi );

    if ( pi->legs.yawing && ( pi->legsAnim & ~ANIM_TOGGLEBIT ) == LEGS_IDLE ) {
        UI_RunLerpFrame( pi, &pi->legs, LEGS_TURN );
    } else {
        UI_RunLerpFrame( pi, &pi->legs, pi->legsAnim );
    }
    *legsOld = pi->legs.oldFrame;
    *legs = pi->legs.frame;
    *legsBackLerp = pi->legs.backlerp;

    // torso animation
    pi->torsoAnimationTimer -= uiInfo.uiDC.frameTime;
    if ( pi->torsoAnimationTimer < 0 ) {
        pi->torsoAnimationTimer = 0;
    }

    UI_TorsoSequencing( pi );

    UI_RunLerpFrame( pi, &pi->torso, pi->torsoAnim );
    *torsoOld = pi->torso.oldFrame;
    *torso = pi->torso.frame;
    *torsoBackLerp = pi->torso.backlerp;
}
Example #2
0
/*
 * UI_PlayerAnimation
 */
static void
UI_PlayerAnimation(Playerinfo *pi, int *legsOld, int *legs,
		   float *legsBackLerp,
		   int *torsoOld, int *torso,
		   float *torsoBackLerp)
{

	/* legs animation */
	pi->legsAnimationTimer -= uis.frametime;
	if(pi->legsAnimationTimer < 0)
		pi->legsAnimationTimer = 0;

	UI_LegsSequencing(pi);

	if(pi->legs.yawing && (pi->legsAnim & ~ANIM_TOGGLEBIT) == LEGS_IDLE)
		UI_RunLerpFrame(pi, &pi->legs, LEGS_TURN);
	else
		UI_RunLerpFrame(pi, &pi->legs, pi->legsAnim);
	*legsOld = pi->legs.oldFrame;
	*legs = pi->legs.frame;
	*legsBackLerp = pi->legs.backlerp;

	/* torso animation */
	pi->torsoAnimationTimer -= uis.frametime;
	if(pi->torsoAnimationTimer < 0)
		pi->torsoAnimationTimer = 0;

	UI_TorsoSequencing(pi);

	UI_RunLerpFrame(pi, &pi->torso, pi->torsoAnim);
	*torsoOld = pi->torso.oldFrame;
	*torso = pi->torso.frame;
	*torsoBackLerp = pi->torso.backlerp;
}
Example #3
0
/*
===============
UI_PlayerAnimation
===============
*/
static void UI_PlayerAnimation( uiPlayerInfo_t *pi, int *legsOld, int *legs, float *legsBackLerp,
						int *torsoOld, int *torso, float *torsoBackLerp ) {

	// legs animation
	pi->legsAnimationTimer -= uiInfo.uiDC.frameTime;
	if ( pi->legsAnimationTimer < 0 ) {
		pi->legsAnimationTimer = 0;
	}

	UI_LegsSequencing( pi );

	if ( pi->legs.yawing &&
#ifdef TA_WEAPSYS
		BG_PlayerStandAnim(&pi->playercfg, AP_LEGS, pi->legsAnim)
#else
		( pi->legsAnim & ~ANIM_TOGGLEBIT ) == LEGS_IDLE
#endif
		)
	{
#ifdef IOQ3ZTM // LERP_FRAME_CLIENT_LESS
		BG_RunLerpFrame( &pi->legs,
#ifdef TA_PLAYERSYS
			pi->playercfg.animations,
#else
			pi->animations,
#endif
			LEGS_TURN, dp_realtime, 1.0f );
#else
		UI_RunLerpFrame( pi, &pi->legs, LEGS_TURN );
#endif
	} else {
#ifdef IOQ3ZTM // LERP_FRAME_CLIENT_LESS
		BG_RunLerpFrame( &pi->legs,
#ifdef TA_PLAYERSYS
			pi->playercfg.animations,
#else
			pi->animations,
#endif
			pi->legsAnim, dp_realtime, 1.0f );
#else
		UI_RunLerpFrame( pi, &pi->legs, pi->legsAnim );
#endif
	}
	*legsOld = pi->legs.oldFrame;
	*legs = pi->legs.frame;
	*legsBackLerp = pi->legs.backlerp;

	// torso animation
	pi->torsoAnimationTimer -= uiInfo.uiDC.frameTime;
	if ( pi->torsoAnimationTimer < 0 ) {
		pi->torsoAnimationTimer = 0;
	}

	UI_TorsoSequencing( pi );

#ifdef IOQ3ZTM // LERP_FRAME_CLIENT_LESS
	BG_RunLerpFrame( &pi->torso,
#ifdef TA_PLAYERSYS
		pi->playercfg.animations,
#else
		pi->animations,
#endif
		pi->torsoAnim, dp_realtime, 1.0f );
#else
	UI_RunLerpFrame( pi, &pi->torso, pi->torsoAnim );
#endif
	*torsoOld = pi->torso.oldFrame;
	*torso = pi->torso.frame;
	*torsoBackLerp = pi->torso.backlerp;
}