codemp/game/bg_panimate.c File Reference

#include "q_shared.h"
#include "bg_public.h"
#include "bg_strap.h"
#include "bg_local.h"
#include "anims.h"
#include "../cgame/animtable.h"
#include "../namespace_begin.h"
#include "../namespace_end.h"

Go to the source code of this file.

Functions

saberInfo_tBG_MySaber (int clientNum, int saberNum)
qboolean BG_SaberStanceAnim (int anim)
qboolean BG_CrouchAnim (int anim)
qboolean BG_InSpecialJump (int anim)
qboolean BG_InSaberStandAnim (int anim)
qboolean BG_InReboundJump (int anim)
qboolean BG_InReboundHold (int anim)
qboolean BG_InReboundRelease (int anim)
qboolean BG_InBackFlip (int anim)
qboolean BG_DirectFlippingAnim (int anim)
qboolean BG_SaberInAttackPure (int move)
qboolean BG_SaberInAttack (int move)
qboolean BG_SaberInKata (int saberMove)
qboolean BG_InKataAnim (int anim)
qboolean BG_SaberInSpecial (int move)
qboolean BG_KickMove (int move)
qboolean BG_SaberInIdle (int move)
qboolean BG_InExtraDefenseSaberMove (int move)
qboolean BG_FlippingAnim (int anim)
qboolean BG_SpinningSaberAnim (int anim)
qboolean BG_SaberInSpecialAttack (int anim)
qboolean BG_KickingAnim (int anim)
int BG_InGrappleMove (int anim)
int BG_BrokenParryForAttack (int move)
int BG_BrokenParryForParry (int move)
int BG_KnockawayForParry (int move)
qboolean BG_InRoll (playerState_t *ps, int anim)
qboolean BG_InSpecialDeathAnim (int anim)
qboolean BG_InDeathAnim (int anim)
qboolean BG_InKnockDownOnly (int anim)
qboolean BG_InSaberLockOld (int anim)
qboolean BG_InSaberLock (int anim)
qboolean PM_InCartwheel (int anim)
qboolean BG_InKnockDownOnGround (playerState_t *ps)
qboolean BG_StabDownAnim (int anim)
int PM_SaberBounceForAttack (int move)
int PM_SaberDeflectionForQuad (int quad)
qboolean PM_SaberInDeflect (int move)
qboolean PM_SaberInParry (int move)
qboolean PM_SaberInKnockaway (int move)
qboolean PM_SaberInReflect (int move)
qboolean PM_SaberInStart (int move)
qboolean PM_SaberInReturn (int move)
qboolean BG_SaberInReturn (int move)
qboolean PM_InSaberAnim (int anim)
qboolean PM_InKnockDown (playerState_t *ps)
qboolean PM_PainAnim (int anim)
qboolean PM_JumpingAnim (int anim)
qboolean PM_LandingAnim (int anim)
qboolean PM_SpinningAnim (int anim)
qboolean PM_InOnGroundAnim (int anim)
qboolean PM_InRollComplete (playerState_t *ps, int anim)
qboolean PM_CanRollFromSoulCal (playerState_t *ps)
qboolean BG_SuperBreakLoseAnim (int anim)
qboolean BG_SuperBreakWinAnim (int anim)
qboolean BG_SaberLockBreakAnim (int anim)
qboolean BG_FullBodyTauntAnim (int anim)
int BG_AnimLength (int index, animNumber_t anim)
int PM_AnimLength (int index, animNumber_t anim)
void PM_DebugLegsAnim (int anim)
qboolean PM_SaberInTransition (int move)
qboolean BG_SaberInTransitionAny (int move)
void BG_FlipPart (playerState_t *ps, int part)
void BG_InitAnimsets (void)
void BG_ClearAnimsets (void)
animation_tBG_AnimsetAlloc (void)
void BG_AnimsetFree (animation_t *animset)
int CheckAnimFrameForEventType (animevent_t *animEvents, int keyFrame, animEventType_t eventType)
void ParseAnimationEvtBlock (const char *aeb_filename, animevent_t *animEvents, animation_t *animations, int *i, const char **text_p)
int BG_ParseAnimationEvtFile (const char *as_filename, int animFileIndex, int eventFileIndex)
int BG_ParseAnimationFile (const char *filename, animation_t *animset, qboolean isHumanoid)
void PM_ContinueLegsAnim (int anim)
void PM_ForceLegsAnim (int anim)
void BG_StartTorsoAnim (playerState_t *ps, int anim)
void PM_StartTorsoAnim (int anim)
void BG_SetLegsAnimTimer (playerState_t *ps, int time)
void PM_SetLegsAnimTimer (int time)
void BG_SetTorsoAnimTimer (playerState_t *ps, int time)
void PM_SetTorsoAnimTimer (int time)
void BG_SaberStartTransAnim (int clientNum, int saberAnimLevel, int weapon, int anim, float *animSpeed, int broken)
qboolean PM_RunningAnim (int anim)
qboolean PM_WalkingAnim (int anim)
void BG_SetAnimFinal (playerState_t *ps, animation_t *animations, int setAnimParts, int anim, int setAnimFlags, int blendTime)
void PM_SetAnimFinal (int setAnimParts, int anim, int setAnimFlags, int blendTime)
qboolean BG_HasAnimation (int animIndex, int animation)
int BG_PickAnim (int animIndex, int minAnim, int maxAnim)
void BG_SetAnim (playerState_t *ps, animation_t *animations, int setAnimParts, int anim, int setAnimFlags, int blendTime)
void PM_SetAnim (int setAnimParts, int anim, int setAnimFlags, int blendTime)

Variables

qboolean BGPAFtextLoaded = qfalse
animation_t bgHumanoidAnimations [MAX_TOTALANIMATIONS]
bgLoadedAnim_t bgAllAnims [MAX_ANIM_FILES]
int bgNumAllAnims = 2
stringID_table_t animEventTypeTable [MAX_ANIM_EVENTS+1]
stringID_table_t footstepTypeTable [NUM_FOOTSTEP_TYPES+1]
bgLoadedEvents_t bgAllEvents [MAX_ANIM_FILES]
int bgNumAnimEvents = 1


Function Documentation

int BG_AnimLength int  index,
animNumber_t  anim
 

Definition at line 1573 of file bg_panimate.c.

References bgLoadedAnim_t::anims, bgAllAnims, fabs(), MAX_ANIMATIONS, and animation_s::numFrames.

Referenced by AnimateRiders(), BG_InKnockDownOnGround(), G_SetTauntAnim(), and Jedi_CheckFlipEvasions().

01574 {
01575         if (anim >= MAX_ANIMATIONS)
01576         {
01577                 return -1;
01578         }
01579         
01580         return bgAllAnims[index].anims[anim].numFrames * fabs((float)(bgAllAnims[index].anims[anim].frameLerp));
01581 }

animation_t* BG_AnimsetAlloc void   ) 
 

Definition at line 1729 of file bg_panimate.c.

References animation_t, BG_Alloc(), bgAllAnims, bgNumAllAnims, MAX_ANIM_FILES, and MAX_TOTALANIMATIONS.

Referenced by BG_ParseAnimationFile().

01730 {
01731         assert (bgNumAllAnims < MAX_ANIM_FILES);
01732         bgAllAnims[bgNumAllAnims].anims = (animation_t *) BG_Alloc(sizeof(animation_t)*MAX_TOTALANIMATIONS);
01733 
01734         return bgAllAnims[bgNumAllAnims].anims;
01735 }

void BG_AnimsetFree animation_t animset  ) 
 

Definition at line 1737 of file bg_panimate.c.

References animation_t.

Referenced by BG_ParseAnimationFile().

01738 {
01739         /*
01740         if (!animset)
01741         {
01742                 return;
01743         }
01744 
01745         strap_TrueFree((void **)&animset);
01746 
01747 #ifdef _DEBUG
01748         if (animset)
01749         {
01750                 assert(!"Failed to free anim set");
01751         }
01752 #endif
01753         */
01754 }

int BG_BrokenParryForAttack int  move  ) 
 

Definition at line 692 of file bg_panimate.c.

References LS_NONE, LS_V1__L, LS_V1__R, LS_V1_B_, LS_V1_BL, LS_V1_BR, LS_V1_T_, LS_V1_TL, LS_V1_TR, Q_B, Q_BL, Q_BR, Q_L, Q_R, Q_T, Q_TL, Q_TR, saberMoveData, and saberMoveData_t::startQuad.

00693 {
00694         //Our attack was knocked away by a knockaway parry
00695         //FIXME: need actual anims for this
00696         //FIXME: need to know which side of the saber was hit!  For now, we presume the saber gets knocked away from the center
00697         switch ( saberMoveData[move].startQuad )
00698         {
00699         case Q_B:
00700                 return LS_V1_B_;
00701                 break;
00702         case Q_BR:
00703                 return LS_V1_BR;
00704                 break;
00705         case Q_R:
00706                 return LS_V1__R;
00707                 break;
00708         case Q_TR:
00709                 return LS_V1_TR;
00710                 break;
00711         case Q_T:
00712                 return LS_V1_T_;
00713                 break;
00714         case Q_TL:
00715                 return LS_V1_TL;
00716                 break;
00717         case Q_L:
00718                 return LS_V1__L;
00719                 break;
00720         case Q_BL:
00721                 return LS_V1_BL;
00722                 break;
00723         }
00724         return LS_NONE;
00725 }

int BG_BrokenParryForParry int  move  ) 
 

Definition at line 727 of file bg_panimate.c.

References LS_H1_B_, LS_H1_BL, LS_H1_BR, LS_H1_T_, LS_H1_TL, LS_H1_TR, LS_NONE, LS_PARRY_LL, LS_PARRY_LR, LS_PARRY_UL, LS_PARRY_UP, LS_PARRY_UR, LS_READY, and Q_irand().

00728 {
00729         //FIXME: need actual anims for this
00730         //FIXME: need to know which side of the saber was hit!  For now, we presume the saber gets knocked away from the center
00731         switch ( move )
00732         {
00733         case LS_PARRY_UP:
00734                 //Hmm... since we don't know what dir the hit came from, randomly pick knock down or knock back
00735                 if ( Q_irand( 0, 1 ) )
00736                 {
00737                         return LS_H1_B_;
00738                 }
00739                 else
00740                 {
00741                         return LS_H1_T_;
00742                 }
00743                 break;
00744         case LS_PARRY_UR:
00745                 return LS_H1_TR;
00746                 break;
00747         case LS_PARRY_UL:
00748                 return LS_H1_TL;
00749                 break;
00750         case LS_PARRY_LR:
00751                 return LS_H1_BR;
00752                 break;
00753         case LS_PARRY_LL:
00754                 return LS_H1_BL;
00755                 break;
00756         case LS_READY:
00757                 return LS_H1_B_;//???
00758                 break;
00759         }
00760         return LS_NONE;
00761 }

void BG_ClearAnimsets void   ) 
 

Definition at line 1713 of file bg_panimate.c.

Referenced by CG_Shutdown(), and G_ShutdownGame().

01714 {
01715         /*
01716         int i = 1;
01717 
01718         while (i < bgNumAllAnims)
01719         {
01720                 if (bgAllAnims[i].anims)
01721                 {
01722                         strap_TrueFree((void **)&bgAllAnims[i].anims);
01723                 }
01724                 i++;
01725         }
01726         */
01727 }

qboolean BG_CrouchAnim int  anim  ) 
 

Definition at line 49 of file bg_panimate.c.

References BOTH_CROUCH1, BOTH_CROUCH1IDLE, BOTH_CROUCH1WALK, BOTH_CROUCH1WALKBACK, BOTH_CROUCH2TOSTAND1, BOTH_CROUCH3, BOTH_CROUCHATTACKBACK1, BOTH_KNEES1, BOTH_ROLL_STAB, BOTH_SIT1, BOTH_SIT2, BOTH_SIT3, qboolean, qfalse, and qtrue.

Referenced by NPC_BSGM_Attack(), NPC_ChoosePainAnimation(), and WP_ResistForcePush().

00050 {
00051         switch ( anim )
00052         {
00053         case BOTH_SIT1:                         //# Normal chair sit.
00054         case BOTH_SIT2:                         //# Lotus position.
00055         case BOTH_SIT3:                         //# Sitting in tired position: elbows on knees
00056         case BOTH_CROUCH1:                      //# Transition from standing to crouch
00057         case BOTH_CROUCH1IDLE:          //# Crouching idle
00058         case BOTH_CROUCH1WALK:          //# Walking while crouched
00059         case BOTH_CROUCH1WALKBACK:      //# Walking while crouched
00060         case BOTH_CROUCH2TOSTAND1:      //# going from crouch2 to stand1
00061         case BOTH_CROUCH3:                      //# Desann crouching down to Kyle (cin 9)
00062         case BOTH_KNEES1:                       //# Tavion on her knees
00063         case BOTH_CROUCHATTACKBACK1://FIXME: not if in middle of anim?
00064         case BOTH_ROLL_STAB:
00065                 return qtrue;
00066                 break;
00067         }
00068         return qfalse;
00069 }

qboolean BG_DirectFlippingAnim int  anim  ) 
 

Definition at line 204 of file bg_panimate.c.

References BOTH_FLIP_B, BOTH_FLIP_F, BOTH_FLIP_L, BOTH_FLIP_R, qboolean, qfalse, and qtrue.

00205 {
00206         switch ( (anim) )
00207         {
00208         case BOTH_FLIP_F:                       //# Flip forward
00209         case BOTH_FLIP_B:                       //# Flip backwards
00210         case BOTH_FLIP_L:                       //# Flip left
00211         case BOTH_FLIP_R:                       //# Flip right
00212                 return qtrue;
00213                 break;
00214         }
00215 
00216         return qfalse;
00217 }

void BG_FlipPart playerState_t ps,
int  part
 

Definition at line 1642 of file bg_panimate.c.

References playerState_s::legsFlip, playerState_t, qfalse, qtrue, SETANIM_LEGS, SETANIM_TORSO, and playerState_s::torsoFlip.

Referenced by BG_StartTorsoAnim().

01643 {
01644         if (part == SETANIM_TORSO)
01645         {
01646                 if (ps->torsoFlip)
01647                 {
01648                         ps->torsoFlip = qfalse;
01649                 }
01650                 else
01651                 {
01652                         ps->torsoFlip = qtrue;
01653                 }
01654         }
01655         else if (part == SETANIM_LEGS)
01656         {
01657                 if (ps->legsFlip)
01658                 {
01659                         ps->legsFlip = qfalse;
01660                 }
01661                 else
01662                 {
01663                         ps->legsFlip = qtrue;
01664                 }
01665         }
01666 }

qboolean BG_FlippingAnim int  anim  ) 
 

Definition at line 433 of file bg_panimate.c.

References BOTH_A7_SOULCAL, BOTH_ARIAL_F1, BOTH_ARIAL_LEFT, BOTH_ARIAL_RIGHT, BOTH_BUTTERFLY_FL1, BOTH_BUTTERFLY_FR1, BOTH_BUTTERFLY_LEFT, BOTH_BUTTERFLY_RIGHT, BOTH_CARTWHEEL_LEFT, BOTH_CARTWHEEL_RIGHT, BOTH_FLIP_ATTACK7, BOTH_FLIP_B, BOTH_FLIP_BACK1, BOTH_FLIP_BACK2, BOTH_FLIP_BACK3, BOTH_FLIP_F, BOTH_FLIP_L, BOTH_FLIP_R, BOTH_FORCEWALLRUNFLIP_ALT, BOTH_FORCEWALLRUNFLIP_END, BOTH_JUMPATTACK6, BOTH_JUMPATTACK7, BOTH_JUMPFLIPSLASHDOWN1, BOTH_JUMPFLIPSTABDOWN, BOTH_WALL_FLIP_BACK1, BOTH_WALL_FLIP_LEFT, BOTH_WALL_FLIP_RIGHT, BOTH_WALL_RUN_LEFT, BOTH_WALL_RUN_LEFT_FLIP, BOTH_WALL_RUN_LEFT_STOP, BOTH_WALL_RUN_RIGHT, BOTH_WALL_RUN_RIGHT_FLIP, BOTH_WALL_RUN_RIGHT_STOP, qboolean, qfalse, and qtrue.

Referenced by Boba_FireDecide(), Jedi_SaberBusy(), NPC_ChoosePainAnimation(), PM_CheckAltKickAttack(), PM_SetSaberMove(), PM_WeaponLightsaber(), and WP_ResistForcePush().

00434 {
00435         switch ( anim )
00436         {
00437         case BOTH_FLIP_F:                       //# Flip forward
00438         case BOTH_FLIP_B:                       //# Flip backwards
00439         case BOTH_FLIP_L:                       //# Flip left
00440         case BOTH_FLIP_R:                       //# Flip right
00441         case BOTH_WALL_RUN_RIGHT_FLIP:
00442         case BOTH_WALL_RUN_LEFT_FLIP:
00443         case BOTH_WALL_FLIP_RIGHT:
00444         case BOTH_WALL_FLIP_LEFT:
00445         case BOTH_FLIP_BACK1:
00446         case BOTH_FLIP_BACK2:
00447         case BOTH_FLIP_BACK3:
00448         case BOTH_WALL_FLIP_BACK1:
00449         //Not really flips, but...
00450         case BOTH_WALL_RUN_RIGHT:
00451         case BOTH_WALL_RUN_LEFT:
00452         case BOTH_WALL_RUN_RIGHT_STOP:
00453         case BOTH_WALL_RUN_LEFT_STOP:
00454         case BOTH_BUTTERFLY_LEFT:
00455         case BOTH_BUTTERFLY_RIGHT:
00456         case BOTH_BUTTERFLY_FL1:
00457         case BOTH_BUTTERFLY_FR1:
00458         //
00459         case BOTH_ARIAL_LEFT:
00460         case BOTH_ARIAL_RIGHT:
00461         case BOTH_ARIAL_F1:
00462         case BOTH_CARTWHEEL_LEFT:
00463         case BOTH_CARTWHEEL_RIGHT:
00464         case BOTH_JUMPFLIPSLASHDOWN1:
00465         case BOTH_JUMPFLIPSTABDOWN:
00466         case BOTH_JUMPATTACK6:
00467         case BOTH_JUMPATTACK7:
00468         //JKA
00469         case BOTH_FORCEWALLRUNFLIP_END:
00470         case BOTH_FORCEWALLRUNFLIP_ALT:
00471         case BOTH_FLIP_ATTACK7:
00472         case BOTH_A7_SOULCAL:
00473                 return qtrue;
00474                 break;
00475         }
00476         return qfalse;
00477 }

qboolean BG_FullBodyTauntAnim int  anim  ) 
 

Definition at line 1538 of file bg_panimate.c.

References BOTH_BOW, BOTH_DUAL_TAUNT, BOTH_GESTURE1, BOTH_MEDITATE, BOTH_SHOWOFF_DUAL, BOTH_SHOWOFF_FAST, BOTH_SHOWOFF_MEDIUM, BOTH_SHOWOFF_STAFF, BOTH_SHOWOFF_STRONG, BOTH_STAFF_TAUNT, BOTH_VICTORY_DUAL, BOTH_VICTORY_FAST, BOTH_VICTORY_MEDIUM, BOTH_VICTORY_STAFF, BOTH_VICTORY_STRONG, qboolean, qfalse, and qtrue.

Referenced by PmoveSingle(), and WP_ForcePowerStart().

01539 {
01540         switch ( anim )
01541         {
01542         case BOTH_GESTURE1:
01543         case BOTH_DUAL_TAUNT:
01544         case BOTH_STAFF_TAUNT:
01545         case BOTH_BOW:
01546         case BOTH_MEDITATE:
01547         case BOTH_SHOWOFF_FAST:
01548         case BOTH_SHOWOFF_MEDIUM:
01549         case BOTH_SHOWOFF_STRONG:
01550         case BOTH_SHOWOFF_DUAL:
01551         case BOTH_SHOWOFF_STAFF:
01552         case BOTH_VICTORY_FAST:
01553         case BOTH_VICTORY_MEDIUM:
01554         case BOTH_VICTORY_STRONG:
01555         case BOTH_VICTORY_DUAL:
01556         case BOTH_VICTORY_STAFF:
01557                 return qtrue;
01558                 break;
01559         }
01560         return qfalse;
01561 }

qboolean BG_HasAnimation int  animIndex,
int  animation
 

Definition at line 2928 of file bg_panimate.c.

References animation_t, bgLoadedAnim_t::anims, bgAllAnims, bgNumAllAnims, MAX_ANIMATIONS, animation_s::numFrames, qboolean, qfalse, and qtrue.

Referenced by BG_PickAnim(), and G_PickDeathAnim().

02929 {
02930         animation_t *animations;
02931 
02932         //must be a valid anim number
02933         if ( animation < 0 || animation >= MAX_ANIMATIONS )
02934         {
02935                 return qfalse;
02936         }
02937 
02938         //Must have a file index entry
02939         if( animIndex < 0 || animIndex > bgNumAllAnims )
02940                 return qfalse;
02941 
02942         animations = bgAllAnims[animIndex].anims;
02943 
02944         //No frames, no anim
02945         if ( animations[animation].numFrames == 0 )
02946                 return qfalse;
02947 
02948         //Has the sequence
02949         return qtrue;
02950 }

qboolean BG_InBackFlip int  anim  ) 
 

Definition at line 191 of file bg_panimate.c.

References BOTH_FLIP_BACK1, BOTH_FLIP_BACK2, BOTH_FLIP_BACK3, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump().

00192 {
00193         switch ( anim )
00194         {
00195         case BOTH_FLIP_BACK1:
00196         case BOTH_FLIP_BACK2:
00197         case BOTH_FLIP_BACK3:
00198                 return qtrue;
00199                 break;
00200         }
00201         return qfalse;
00202 }

qboolean BG_InDeathAnim int  anim  ) 
 

Definition at line 836 of file bg_panimate.c.

References BG_InSpecialDeathAnim(), BOTH_DEAD1, BOTH_DEAD10, BOTH_DEAD11, BOTH_DEAD12, BOTH_DEAD13, BOTH_DEAD14, BOTH_DEAD15, BOTH_DEAD16, BOTH_DEAD17, BOTH_DEAD18, BOTH_DEAD19, BOTH_DEAD2, BOTH_DEAD20, BOTH_DEAD21, BOTH_DEAD22, BOTH_DEAD23, BOTH_DEAD24, BOTH_DEAD25, BOTH_DEAD3, BOTH_DEAD4, BOTH_DEAD5, BOTH_DEAD6, BOTH_DEAD7, BOTH_DEAD8, BOTH_DEAD9, BOTH_DEADBACKWARD1, BOTH_DEADBACKWARD2, BOTH_DEADFLOP1, BOTH_DEADFLOP2, BOTH_DEADFORWARD1, BOTH_DEADFORWARD2, BOTH_DEATH1, BOTH_DEATH10, BOTH_DEATH11, BOTH_DEATH12, BOTH_DEATH13, BOTH_DEATH14, BOTH_DEATH14_SITUP, BOTH_DEATH14_UNGRIP, BOTH_DEATH15, BOTH_DEATH16, BOTH_DEATH17, BOTH_DEATH18, BOTH_DEATH19, BOTH_DEATH1IDLE, BOTH_DEATH2, BOTH_DEATH20, BOTH_DEATH21, BOTH_DEATH22, BOTH_DEATH23, BOTH_DEATH24, BOTH_DEATH25, BOTH_DEATH3, BOTH_DEATH4, BOTH_DEATH5, BOTH_DEATH6, BOTH_DEATH7, BOTH_DEATH8, BOTH_DEATH9, BOTH_DEATHBACKWARD1, BOTH_DEATHBACKWARD2, BOTH_DEATHFORWARD1, BOTH_DEATHFORWARD2, BOTH_DEATHFORWARD3, BOTH_DISMEMBER_HEAD1, BOTH_DISMEMBER_LARM, BOTH_DISMEMBER_LLEG, BOTH_DISMEMBER_RARM, BOTH_DISMEMBER_RLEG, BOTH_DISMEMBER_TORSO1, BOTH_FALLDEAD1LAND, BOTH_FALLDEATH1, BOTH_FALLDEATH1INAIR, BOTH_FALLDEATH1LAND, BOTH_LYINGDEAD1, BOTH_LYINGDEATH1, BOTH_STUMBLEDEAD1, BOTH_STUMBLEDEATH1, qboolean, and qtrue.

Referenced by BG_StartTorsoAnim(), and G_Dismember().

00837 {//Purposely does not cover stumbledeath and falldeath...
00838         switch( anim )
00839         {
00840         case BOTH_DEATH1:               //# First Death anim
00841         case BOTH_DEATH2:                       //# Second Death anim
00842         case BOTH_DEATH3:                       //# Third Death anim
00843         case BOTH_DEATH4:                       //# Fourth Death anim
00844         case BOTH_DEATH5:                       //# Fifth Death anim
00845         case BOTH_DEATH6:                       //# Sixth Death anim
00846         case BOTH_DEATH7:                       //# Seventh Death anim
00847         case BOTH_DEATH8:                       //# 
00848         case BOTH_DEATH9:                       //# 
00849         case BOTH_DEATH10:                      //# 
00850         case BOTH_DEATH11:                      //#
00851         case BOTH_DEATH12:                      //# 
00852         case BOTH_DEATH13:                      //# 
00853         case BOTH_DEATH14:                      //# 
00854         case BOTH_DEATH14_UNGRIP:       //# Desann's end death (cin #35)
00855         case BOTH_DEATH14_SITUP:                //# Tavion sitting up after having been thrown (cin #23)
00856         case BOTH_DEATH15:                      //# 
00857         case BOTH_DEATH16:                      //# 
00858         case BOTH_DEATH17:                      //# 
00859         case BOTH_DEATH18:                      //# 
00860         case BOTH_DEATH19:                      //# 
00861         case BOTH_DEATH20:                      //# 
00862         case BOTH_DEATH21:                      //# 
00863         case BOTH_DEATH22:                      //# 
00864         case BOTH_DEATH23:                      //# 
00865         case BOTH_DEATH24:                      //# 
00866         case BOTH_DEATH25:                      //# 
00867 
00868         case BOTH_DEATHFORWARD1:                //# First Death in which they get thrown forward
00869         case BOTH_DEATHFORWARD2:                //# Second Death in which they get thrown forward
00870         case BOTH_DEATHFORWARD3:                //# Tavion's falling in cin# 23
00871         case BOTH_DEATHBACKWARD1:       //# First Death in which they get thrown backward
00872         case BOTH_DEATHBACKWARD2:       //# Second Death in which they get thrown backward
00873 
00874         case BOTH_DEATH1IDLE:           //# Idle while close to death
00875         case BOTH_LYINGDEATH1:          //# Death to play when killed lying down
00876         case BOTH_STUMBLEDEATH1:                //# Stumble forward and fall face first death
00877         case BOTH_FALLDEATH1:           //# Fall forward off a high cliff and splat death - start
00878         case BOTH_FALLDEATH1INAIR:      //# Fall forward off a high cliff and splat death - loop
00879         case BOTH_FALLDEATH1LAND:       //# Fall forward off a high cliff and splat death - hit bottom
00880         //# #sep case BOTH_ DEAD POSES # Should be last frame of corresponding previous anims
00881         case BOTH_DEAD1:                                //# First Death finished pose
00882         case BOTH_DEAD2:                                //# Second Death finished pose
00883         case BOTH_DEAD3:                                //# Third Death finished pose
00884         case BOTH_DEAD4:                                //# Fourth Death finished pose
00885         case BOTH_DEAD5:                                //# Fifth Death finished pose
00886         case BOTH_DEAD6:                                //# Sixth Death finished pose
00887         case BOTH_DEAD7:                                //# Seventh Death finished pose
00888         case BOTH_DEAD8:                                //# 
00889         case BOTH_DEAD9:                                //# 
00890         case BOTH_DEAD10:                       //# 
00891         case BOTH_DEAD11:                       //#
00892         case BOTH_DEAD12:                       //# 
00893         case BOTH_DEAD13:                       //# 
00894         case BOTH_DEAD14:                       //# 
00895         case BOTH_DEAD15:                       //# 
00896         case BOTH_DEAD16:                       //# 
00897         case BOTH_DEAD17:                       //# 
00898         case BOTH_DEAD18:                       //# 
00899         case BOTH_DEAD19:                       //# 
00900         case BOTH_DEAD20:                       //# 
00901         case BOTH_DEAD21:                       //# 
00902         case BOTH_DEAD22:                       //# 
00903         case BOTH_DEAD23:                       //# 
00904         case BOTH_DEAD24:                       //# 
00905         case BOTH_DEAD25:                       //# 
00906         case BOTH_DEADFORWARD1:         //# First thrown forward death finished pose
00907         case BOTH_DEADFORWARD2:         //# Second thrown forward death finished pose
00908         case BOTH_DEADBACKWARD1:                //# First thrown backward death finished pose
00909         case BOTH_DEADBACKWARD2:                //# Second thrown backward death finished pose
00910         case BOTH_LYINGDEAD1:           //# Killed lying down death finished pose
00911         case BOTH_STUMBLEDEAD1:         //# Stumble forward death finished pose
00912         case BOTH_FALLDEAD1LAND:                //# Fall forward and splat death finished pose
00913         //# #sep case BOTH_ DEAD TWITCH/FLOP # React to being shot from death poses
00914         case BOTH_DEADFLOP1:            //# React to being shot from First Death finished pose
00915         case BOTH_DEADFLOP2:            //# React to being shot from Second Death finished pose
00916         case BOTH_DISMEMBER_HEAD1:      //#
00917         case BOTH_DISMEMBER_TORSO1:     //#
00918         case BOTH_DISMEMBER_LLEG:       //#
00919         case BOTH_DISMEMBER_RLEG:       //#
00920         case BOTH_DISMEMBER_RARM:       //#
00921         case BOTH_DISMEMBER_LARM:       //#
00922                 return qtrue;
00923                 break;
00924         default:
00925                 return BG_InSpecialDeathAnim( anim );
00926                 break;
00927         }
00928 }

qboolean BG_InExtraDefenseSaberMove int  move  ) 
 

Definition at line 415 of file bg_panimate.c.

References LS_A1_SPECIAL, LS_A2_SPECIAL, LS_A3_SPECIAL, LS_DUAL_SPIN_PROTECT, LS_JUMPATTACK_DUAL, LS_SPINATTACK, LS_SPINATTACK_DUAL, LS_STAFF_SOULCAL, qboolean, qfalse, and qtrue.

Referenced by saberCheckKnockdown_Smashed().

00416 {
00417         switch ( move )
00418         {
00419         case LS_SPINATTACK_DUAL:
00420         case LS_SPINATTACK:
00421         case LS_DUAL_SPIN_PROTECT:
00422         case LS_STAFF_SOULCAL:
00423         case LS_A1_SPECIAL:
00424         case LS_A2_SPECIAL:
00425         case LS_A3_SPECIAL:
00426         case LS_JUMPATTACK_DUAL:
00427                 return qtrue;
00428                 break;
00429         }
00430         return qfalse;
00431 }

int BG_InGrappleMove int  anim  ) 
 

Definition at line 672 of file bg_panimate.c.

References BOTH_KYLE_GRAB, BOTH_KYLE_MISS, BOTH_KYLE_PA_1, BOTH_KYLE_PA_2, BOTH_PLAYER_PA_1, BOTH_PLAYER_PA_2, and BOTH_PLAYER_PA_FLY.

Referenced by CG_DrawActiveFrame(), PmoveSingle(), and WP_SaberPositionUpdate().

00673 {
00674         switch (anim)
00675         {
00676         case BOTH_KYLE_GRAB:
00677         case BOTH_KYLE_MISS:
00678                 return 1; //grabbing at someone
00679         case BOTH_KYLE_PA_1:
00680         case BOTH_KYLE_PA_2:
00681                 return 2; //beating the shit out of someone
00682         case BOTH_PLAYER_PA_1:
00683         case BOTH_PLAYER_PA_2:
00684         case BOTH_PLAYER_PA_FLY:
00685                 return 3; //getting the shit beaten out of you
00686                 break;
00687         }
00688 
00689         return 0;
00690 }

void BG_InitAnimsets void   ) 
 

Definition at line 1706 of file bg_panimate.c.

References bgAllAnims, BGPAFtextLoaded, memset(), and qfalse.

Referenced by CG_Init(), and G_InitGame().

01707 {
01708         memset(&bgAllAnims, 0, sizeof(bgAllAnims));
01709         BGPAFtextLoaded = qfalse;       // VVFIXME - The PC doesn't seem to need this, but why?
01710 }

qboolean BG_InKataAnim int  anim  ) 
 

Definition at line 306 of file bg_panimate.c.

References BOTH_A1_SPECIAL, BOTH_A2_SPECIAL, BOTH_A3_SPECIAL, BOTH_A6_SABERPROTECT, BOTH_A7_SOULCAL, qboolean, qfalse, and qtrue.

Referenced by PM_CanDoKata(), and PmoveSingle().

00307 {
00308         switch (anim)
00309         {
00310         case BOTH_A6_SABERPROTECT:
00311         case BOTH_A7_SOULCAL:
00312         case BOTH_A1_SPECIAL:
00313         case BOTH_A2_SPECIAL:
00314         case BOTH_A3_SPECIAL:
00315                 return qtrue;
00316         }
00317         return qfalse;
00318 }

qboolean BG_InKnockDownOnGround playerState_t ps  ) 
 

Definition at line 1010 of file bg_panimate.c.

References animNumber_t, BG_AnimLength(), BOTH_FORCE_GETUP_B1, BOTH_FORCE_GETUP_B2, BOTH_FORCE_GETUP_B3, BOTH_FORCE_GETUP_B4, BOTH_FORCE_GETUP_B5, BOTH_FORCE_GETUP_B6, BOTH_FORCE_GETUP_F1, BOTH_FORCE_GETUP_F2, BOTH_GETUP1, BOTH_GETUP2, BOTH_GETUP3, BOTH_GETUP4, BOTH_GETUP5, BOTH_GETUP_BROLL_B, BOTH_GETUP_BROLL_F, BOTH_GETUP_BROLL_L, BOTH_GETUP_BROLL_R, BOTH_GETUP_CROUCH_B1, BOTH_GETUP_CROUCH_F1, BOTH_GETUP_FROLL_B, BOTH_GETUP_FROLL_F, BOTH_GETUP_FROLL_L, BOTH_GETUP_FROLL_R, BOTH_KNOCKDOWN1, BOTH_KNOCKDOWN2, BOTH_KNOCKDOWN3, BOTH_KNOCKDOWN4, BOTH_KNOCKDOWN5, BOTH_LK_DL_ST_T_SB_1_L, BOTH_PLAYER_PA_3_FLY, BOTH_RELEASED, playerState_s::legsAnim, playerState_s::legsTimer, playerState_t, qboolean, qfalse, and qtrue.

01011 {
01012         switch ( ps->legsAnim )
01013         {
01014         case BOTH_KNOCKDOWN1:
01015         case BOTH_KNOCKDOWN2:
01016         case BOTH_KNOCKDOWN3:
01017         case BOTH_KNOCKDOWN4:
01018         case BOTH_KNOCKDOWN5:
01019         case BOTH_RELEASED:
01020                 //if ( PM_AnimLength( g_entities[ps->clientNum].client->clientInfo.animFileIndex, (animNumber_t)ps->legsAnim ) - ps->legsAnimTimer > 300 )
01021                 {//at end of fall down anim
01022                         return qtrue;
01023                 }
01024                 break;
01025         case BOTH_GETUP1:
01026         case BOTH_GETUP2:
01027         case BOTH_GETUP3:
01028         case BOTH_GETUP4:
01029         case BOTH_GETUP5:
01030         case BOTH_GETUP_CROUCH_F1:
01031         case BOTH_GETUP_CROUCH_B1:
01032         case BOTH_FORCE_GETUP_F1:
01033         case BOTH_FORCE_GETUP_F2:
01034         case BOTH_FORCE_GETUP_B1:
01035         case BOTH_FORCE_GETUP_B2:
01036         case BOTH_FORCE_GETUP_B3:
01037         case BOTH_FORCE_GETUP_B4:
01038         case BOTH_FORCE_GETUP_B5:
01039         case BOTH_FORCE_GETUP_B6:
01040                 if ( BG_AnimLength( 0, (animNumber_t)ps->legsAnim ) - ps->legsTimer < 500 )
01041                 {//at beginning of getup anim
01042                         return qtrue;
01043                 }
01044                 break;
01045         case BOTH_GETUP_BROLL_B:
01046         case BOTH_GETUP_BROLL_F:
01047         case BOTH_GETUP_BROLL_L:
01048         case BOTH_GETUP_BROLL_R:
01049         case BOTH_GETUP_FROLL_B:
01050         case BOTH_GETUP_FROLL_F:
01051         case BOTH_GETUP_FROLL_L:
01052         case BOTH_GETUP_FROLL_R:
01053                 if ( BG_AnimLength( 0, (animNumber_t)ps->legsAnim ) - ps->legsTimer < 500 )
01054                 {//at beginning of getup anim
01055                         return qtrue;
01056                 }
01057                 break;
01058         case BOTH_LK_DL_ST_T_SB_1_L:
01059                 if ( ps->legsTimer < 1000 )
01060                 {
01061                         return qtrue;
01062                 }
01063                 break;
01064         case BOTH_PLAYER_PA_3_FLY:
01065                 if ( ps->legsTimer < 300 )
01066                 {
01067                         return qtrue;
01068                 }
01069                 break;
01070         }
01071         return qfalse;
01072 }

qboolean BG_InKnockDownOnly int  anim  ) 
 

Definition at line 930 of file bg_panimate.c.

References BOTH_KNOCKDOWN1, BOTH_KNOCKDOWN2, BOTH_KNOCKDOWN3, BOTH_KNOCKDOWN4, BOTH_KNOCKDOWN5, qboolean, qfalse, and qtrue.

Referenced by ClientEvents(), and DoFall().

00931 {
00932         switch ( anim )
00933         {
00934         case BOTH_KNOCKDOWN1:
00935         case BOTH_KNOCKDOWN2:
00936         case BOTH_KNOCKDOWN3:
00937         case BOTH_KNOCKDOWN4:
00938         case BOTH_KNOCKDOWN5:
00939                 return qtrue;
00940         }
00941         return qfalse;
00942 }

qboolean BG_InReboundHold int  anim  ) 
 

Definition at line 163 of file bg_panimate.c.

References BOTH_FORCEWALLHOLD_BACK, BOTH_FORCEWALLHOLD_FORWARD, BOTH_FORCEWALLHOLD_LEFT, BOTH_FORCEWALLHOLD_RIGHT, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump(), G_LetGoOfWall(), PM_AdjustAngleForWallJump(), and PM_StepSlideMove().

00164 {
00165         switch ( anim )
00166         {
00167         case BOTH_FORCEWALLHOLD_FORWARD:
00168         case BOTH_FORCEWALLHOLD_LEFT:
00169         case BOTH_FORCEWALLHOLD_BACK:
00170         case BOTH_FORCEWALLHOLD_RIGHT:
00171                 return qtrue;
00172                 break;
00173         }
00174         return qfalse;
00175 }

qboolean BG_InReboundJump int  anim  ) 
 

Definition at line 149 of file bg_panimate.c.

References BOTH_FORCEWALLREBOUND_BACK, BOTH_FORCEWALLREBOUND_FORWARD, BOTH_FORCEWALLREBOUND_LEFT, BOTH_FORCEWALLREBOUND_RIGHT, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump(), G_LetGoOfWall(), PM_AdjustAngleForWallJump(), and PM_GroundSlideOkay().

00150 {
00151         switch ( anim )
00152         {
00153         case BOTH_FORCEWALLREBOUND_FORWARD:
00154         case BOTH_FORCEWALLREBOUND_LEFT:
00155         case BOTH_FORCEWALLREBOUND_BACK:
00156         case BOTH_FORCEWALLREBOUND_RIGHT:
00157                 return qtrue;
00158                 break;
00159         }
00160         return qfalse;
00161 }

qboolean BG_InReboundRelease int  anim  ) 
 

Definition at line 177 of file bg_panimate.c.

References BOTH_FORCEWALLRELEASE_BACK, BOTH_FORCEWALLRELEASE_FORWARD, BOTH_FORCEWALLRELEASE_LEFT, BOTH_FORCEWALLRELEASE_RIGHT, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump().

00178 {
00179         switch ( anim )
00180         {
00181         case BOTH_FORCEWALLRELEASE_FORWARD:
00182         case BOTH_FORCEWALLRELEASE_LEFT:
00183         case BOTH_FORCEWALLRELEASE_BACK:
00184         case BOTH_FORCEWALLRELEASE_RIGHT:
00185                 return qtrue;
00186                 break;
00187         }
00188         return qfalse;
00189 }

qboolean BG_InRoll playerState_t ps,
int  anim
 

Definition at line 789 of file bg_panimate.c.

References BOTH_GETUP_BROLL_B, BOTH_GETUP_BROLL_F, BOTH_GETUP_BROLL_L, BOTH_GETUP_BROLL_R, BOTH_GETUP_FROLL_B, BOTH_GETUP_FROLL_F, BOTH_GETUP_FROLL_L, BOTH_GETUP_FROLL_R, BOTH_ROLL_B, BOTH_ROLL_F, BOTH_ROLL_L, BOTH_ROLL_R, playerState_s::legsTimer, playerState_t, qboolean, qfalse, and qtrue.

Referenced by BG_AdjustClientSpeed(), Jedi_CheckFlipEvasions(), Jedi_SaberBlockGo(), PM_ForceLegsAnim(), PM_SetSaberMove(), PM_WeaponLightsaber(), PmoveSingle(), and WP_SabersCheckLock().

00790 {
00791         switch ( (anim) )
00792         {
00793         case BOTH_GETUP_BROLL_B:
00794         case BOTH_GETUP_BROLL_F:
00795         case BOTH_GETUP_BROLL_L:
00796         case BOTH_GETUP_BROLL_R:
00797         case BOTH_GETUP_FROLL_B:
00798         case BOTH_GETUP_FROLL_F:
00799         case BOTH_GETUP_FROLL_L:
00800         case BOTH_GETUP_FROLL_R:
00801         case BOTH_ROLL_F:
00802         case BOTH_ROLL_B:
00803         case BOTH_ROLL_R:
00804         case BOTH_ROLL_L:
00805                 if ( ps->legsTimer > 0 )
00806                 {
00807                         return qtrue;
00808                 }
00809                 break;
00810         }
00811         return qfalse;
00812 }

qboolean BG_InSaberLock int  anim  ) 
 

Definition at line 957 of file bg_panimate.c.

References BG_InSaberLockOld(), BOTH_LK_DL_DL_S_L_1, BOTH_LK_DL_DL_S_L_2, BOTH_LK_DL_DL_T_L_1, BOTH_LK_DL_DL_T_L_2, BOTH_LK_DL_S_S_L_1, BOTH_LK_DL_S_T_L_1, BOTH_LK_DL_ST_S_L_1, BOTH_LK_DL_ST_T_L_1, BOTH_LK_S_DL_S_L_1, BOTH_LK_S_DL_T_L_1, BOTH_LK_S_S_S_L_1, BOTH_LK_S_S_S_L_2, BOTH_LK_S_S_T_L_1, BOTH_LK_S_S_T_L_2, BOTH_LK_S_ST_S_L_1, BOTH_LK_S_ST_T_L_1, BOTH_LK_ST_DL_S_L_1, BOTH_LK_ST_DL_T_L_1, BOTH_LK_ST_S_S_L_1, BOTH_LK_ST_S_T_L_1, BOTH_LK_ST_ST_S_L_1, BOTH_LK_ST_ST_S_L_2, BOTH_LK_ST_ST_T_L_1, BOTH_LK_ST_ST_T_L_2, qboolean, and qtrue.

Referenced by PM_SaberLocked().

00958 {
00959         switch ( anim )
00960         {
00961         case BOTH_LK_S_DL_S_L_1:                //lock if I'm using single vs. a dual
00962         case BOTH_LK_S_DL_T_L_1:                //lock if I'm using single vs. a dual
00963         case BOTH_LK_S_ST_S_L_1:                //lock if I'm using single vs. a staff
00964         case BOTH_LK_S_ST_T_L_1:                //lock if I'm using single vs. a staff
00965         case BOTH_LK_S_S_S_L_1:         //lock if I'm using single vs. a single and I initiated
00966         case BOTH_LK_S_S_T_L_1:         //lock if I'm using single vs. a single and I initiated
00967         case BOTH_LK_DL_DL_S_L_1:       //lock if I'm using dual vs. dual and I initiated
00968         case BOTH_LK_DL_DL_T_L_1:       //lock if I'm using dual vs. dual and I initiated
00969         case BOTH_LK_DL_ST_S_L_1:       //lock if I'm using dual vs. a staff
00970         case BOTH_LK_DL_ST_T_L_1:       //lock if I'm using dual vs. a staff
00971         case BOTH_LK_DL_S_S_L_1:                //lock if I'm using dual vs. a single
00972         case BOTH_LK_DL_S_T_L_1:                //lock if I'm using dual vs. a single
00973         case BOTH_LK_ST_DL_S_L_1:       //lock if I'm using staff vs. dual
00974         case BOTH_LK_ST_DL_T_L_1:       //lock if I'm using staff vs. dual
00975         case BOTH_LK_ST_ST_S_L_1:       //lock if I'm using staff vs. a staff and I initiated
00976         case BOTH_LK_ST_ST_T_L_1:       //lock if I'm using staff vs. a staff and I initiated
00977         case BOTH_LK_ST_S_S_L_1:                //lock if I'm using staff vs. a single
00978         case BOTH_LK_ST_S_T_L_1:                //lock if I'm using staff vs. a single
00979         case BOTH_LK_S_S_S_L_2:
00980         case BOTH_LK_S_S_T_L_2:
00981         case BOTH_LK_DL_DL_S_L_2:
00982         case BOTH_LK_DL_DL_T_L_2:
00983         case BOTH_LK_ST_ST_S_L_2:
00984         case BOTH_LK_ST_ST_T_L_2:
00985                 return qtrue;
00986                 break;
00987         default:
00988                 return BG_InSaberLockOld( anim );
00989                 break;
00990         }
00991         //return qfalse;
00992 }

qboolean BG_InSaberLockOld int  anim  ) 
 

Definition at line 944 of file bg_panimate.c.

References BOTH_BF1LOCK, BOTH_BF2LOCK, BOTH_CCWCIRCLELOCK, BOTH_CWCIRCLELOCK, qboolean, qfalse, and qtrue.

Referenced by BG_InSaberLock(), and PM_SaberLocked().

00945 {
00946         switch ( anim )
00947         {
00948         case BOTH_BF2LOCK:
00949         case BOTH_BF1LOCK:
00950         case BOTH_CWCIRCLELOCK:
00951         case BOTH_CCWCIRCLELOCK:
00952                 return qtrue;
00953         }
00954         return qfalse;
00955 }

qboolean BG_InSaberStandAnim int  anim  ) 
 

Definition at line 134 of file bg_panimate.c.

References BOTH_SABERDUAL_STANCE, BOTH_SABERFAST_STANCE, BOTH_SABERSLOW_STANCE, BOTH_SABERSTAFF_STANCE, BOTH_STAND2, qboolean, qfalse, and qtrue.

Referenced by PM_SetSaberMove().

00135 {
00136         switch ( (anim) )
00137         {
00138         case BOTH_SABERFAST_STANCE:
00139         case BOTH_STAND2:
00140         case BOTH_SABERSLOW_STANCE:
00141         case BOTH_SABERDUAL_STANCE:
00142         case BOTH_SABERSTAFF_STANCE:
00143                 return qtrue;
00144         default:
00145                 return qfalse;
00146         }
00147 }

qboolean BG_InSpecialDeathAnim int  anim  ) 
 

Definition at line 814 of file bg_panimate.c.

References BOTH_DEATH_CROUCHED, BOTH_DEATH_FALLING_DN, BOTH_DEATH_FALLING_UP, BOTH_DEATH_FLIP, BOTH_DEATH_LYING_DN, BOTH_DEATH_LYING_UP, BOTH_DEATH_ROLL, BOTH_DEATH_SPIN_180, BOTH_DEATH_SPIN_90_L, BOTH_DEATH_SPIN_90_R, qboolean, qfalse, and qtrue.

Referenced by BG_InDeathAnim().

00815 {
00816         switch( anim )
00817         {
00818         case BOTH_DEATH_ROLL:           //# Death anim from a roll
00819         case BOTH_DEATH_FLIP:           //# Death anim from a flip
00820         case BOTH_DEATH_SPIN_90_R:      //# Death anim when facing 90 degrees right
00821         case BOTH_DEATH_SPIN_90_L:      //# Death anim when facing 90 degrees left
00822         case BOTH_DEATH_SPIN_180:       //# Death anim when facing backwards
00823         case BOTH_DEATH_LYING_UP:       //# Death anim when lying on back
00824         case BOTH_DEATH_LYING_DN:       //# Death anim when lying on front
00825         case BOTH_DEATH_FALLING_DN:     //# Death anim when falling on face
00826         case BOTH_DEATH_FALLING_UP:     //# Death anim when falling on back
00827         case BOTH_DEATH_CROUCHED:       //# Death anim when crouched
00828                 return qtrue;
00829                 break;
00830         default:
00831                 return qfalse;
00832                 break;
00833         }
00834 }

qboolean BG_InSpecialJump int  anim  ) 
 

Definition at line 71 of file bg_panimate.c.

References BG_InBackFlip(), BG_InReboundHold(), BG_InReboundJump(), BG_InReboundRelease(), BOTH_A7_SOULCAL, BOTH_ARIAL_F1, BOTH_ARIAL_LEFT, BOTH_ARIAL_RIGHT, BOTH_BUTTERFLY_FL1, BOTH_BUTTERFLY_FR1, BOTH_BUTTERFLY_LEFT, BOTH_BUTTERFLY_RIGHT, BOTH_CARTWHEEL_LEFT, BOTH_CARTWHEEL_RIGHT, BOTH_FJSS_TL_BR, BOTH_FJSS_TR_BL, BOTH_FLIP_ATTACK7, BOTH_FLIP_BACK1, BOTH_FLIP_BACK2, BOTH_FLIP_BACK3, BOTH_FLIP_HOLD7, BOTH_FLIP_LAND, BOTH_FORCELEAP2_T__B_, BOTH_FORCELONGLEAP_ATTACK, BOTH_FORCELONGLEAP_START, BOTH_FORCEWALLRUNFLIP_ALT, BOTH_FORCEWALLRUNFLIP_END, BOTH_FORCEWALLRUNFLIP_START, BOTH_JUMPATTACK6, BOTH_JUMPATTACK7, BOTH_JUMPFLIPSLASHDOWN1, BOTH_JUMPFLIPSTABDOWN, BOTH_WALL_FLIP_BACK1, BOTH_WALL_FLIP_LEFT, BOTH_WALL_FLIP_RIGHT, BOTH_WALL_RUN_LEFT, BOTH_WALL_RUN_LEFT_FLIP, BOTH_WALL_RUN_LEFT_STOP, BOTH_WALL_RUN_RIGHT, BOTH_WALL_RUN_RIGHT_FLIP, BOTH_WALL_RUN_RIGHT_STOP, qboolean, qfalse, and qtrue.

Referenced by G_SPSaberDamageTraceLerped(), PM_ForceJumpingUp(), PM_ForceLegsAnim(), PM_SaberAttackForMovement(), PM_SetSaberMove(), and WP_SabersCheckLock().

00072 {
00073         switch ( (anim) )
00074         {
00075         case BOTH_WALL_RUN_RIGHT:
00076         case BOTH_WALL_RUN_RIGHT_STOP:
00077         case BOTH_WALL_RUN_RIGHT_FLIP:
00078         case BOTH_WALL_RUN_LEFT:
00079         case BOTH_WALL_RUN_LEFT_STOP:
00080         case BOTH_WALL_RUN_LEFT_FLIP:
00081         case BOTH_WALL_FLIP_RIGHT:
00082         case BOTH_WALL_FLIP_LEFT:
00083         case BOTH_FLIP_BACK1:
00084         case BOTH_FLIP_BACK2:
00085         case BOTH_FLIP_BACK3:
00086         case BOTH_WALL_FLIP_BACK1:
00087         case BOTH_BUTTERFLY_LEFT:
00088         case BOTH_BUTTERFLY_RIGHT:
00089         case BOTH_BUTTERFLY_FL1:
00090         case BOTH_BUTTERFLY_FR1:
00091         case BOTH_FJSS_TR_BL:
00092         case BOTH_FJSS_TL_BR:
00093         case BOTH_FORCELEAP2_T__B_:
00094         case BOTH_JUMPFLIPSLASHDOWN1://#
00095         case BOTH_JUMPFLIPSTABDOWN://#
00096         case BOTH_JUMPATTACK6:
00097         case BOTH_JUMPATTACK7:
00098         case BOTH_ARIAL_LEFT:
00099         case BOTH_ARIAL_RIGHT:
00100         case BOTH_ARIAL_F1:
00101         case BOTH_CARTWHEEL_LEFT:
00102         case BOTH_CARTWHEEL_RIGHT:
00103 
00104         case BOTH_FORCELONGLEAP_START:
00105         case BOTH_FORCELONGLEAP_ATTACK:
00106         case BOTH_FORCEWALLRUNFLIP_START:
00107         case BOTH_FORCEWALLRUNFLIP_END:
00108         case BOTH_FORCEWALLRUNFLIP_ALT:
00109         case BOTH_FLIP_ATTACK7:
00110         case BOTH_FLIP_HOLD7:
00111         case BOTH_FLIP_LAND:
00112         case BOTH_A7_SOULCAL:
00113                 return qtrue;
00114         }
00115         if ( BG_InReboundJump( anim ) )
00116         {
00117                 return qtrue;
00118         }
00119         if ( BG_InReboundHold( anim ) )
00120         {
00121                 return qtrue;
00122         }
00123         if ( BG_InReboundRelease( anim ) )
00124         {
00125                 return qtrue;
00126         }
00127         if ( BG_InBackFlip( anim ) )
00128         {
00129                 return qtrue;
00130         }
00131         return qfalse;
00132 }

qboolean BG_KickingAnim int  anim  ) 
 

Definition at line 645 of file bg_panimate.c.

References BOTH_A7_HILT, BOTH_A7_KICK_B, BOTH_A7_KICK_B_AIR, BOTH_A7_KICK_BF, BOTH_A7_KICK_F, BOTH_A7_KICK_F_AIR, BOTH_A7_KICK_L, BOTH_A7_KICK_L_AIR, BOTH_A7_KICK_R, BOTH_A7_KICK_R_AIR, BOTH_A7_KICK_RL, BOTH_A7_KICK_S, BOTH_GETUP_BROLL_B, BOTH_GETUP_BROLL_F, BOTH_GETUP_FROLL_B, BOTH_GETUP_FROLL_F, qboolean, qfalse, and qtrue.

Referenced by PM_WeaponLightsaber(), PmoveSingle(), and WP_SaberPositionUpdate().

00646 {
00647         switch ( anim )
00648         {
00649         case BOTH_A7_KICK_F:
00650         case BOTH_A7_KICK_B:
00651         case BOTH_A7_KICK_R:
00652         case BOTH_A7_KICK_L:
00653         case BOTH_A7_KICK_S:
00654         case BOTH_A7_KICK_BF:
00655         case BOTH_A7_KICK_RL:
00656         case BOTH_A7_KICK_F_AIR:
00657         case BOTH_A7_KICK_B_AIR:
00658         case BOTH_A7_KICK_R_AIR:
00659         case BOTH_A7_KICK_L_AIR:
00660         case BOTH_A7_HILT:
00661         //NOT kicks, but do kick traces anyway
00662         case BOTH_GETUP_BROLL_B:
00663         case BOTH_GETUP_BROLL_F:
00664         case BOTH_GETUP_FROLL_B:
00665         case BOTH_GETUP_FROLL_F:
00666                 return qtrue;
00667                 break;
00668         }
00669         return qfalse;
00670 }

qboolean BG_KickMove int  move  ) 
 

Definition at line 380 of file bg_panimate.c.

References LS_HILT_BASH, LS_KICK_B, LS_KICK_B_AIR, LS_KICK_BF, LS_KICK_F, LS_KICK_F_AIR, LS_KICK_L, LS_KICK_L_AIR, LS_KICK_R, LS_KICK_R_AIR, LS_KICK_RL, LS_KICK_S, qboolean, qfalse, and qtrue.

Referenced by PM_SetSaberMove(), and PmoveSingle().

00381 {
00382         switch( move )
00383         {
00384         case LS_KICK_F:
00385         case LS_KICK_B:
00386         case LS_KICK_R:
00387         case LS_KICK_L:
00388         case LS_KICK_S:
00389         case LS_KICK_BF:
00390         case LS_KICK_RL:
00391         case LS_KICK_F_AIR:
00392         case LS_KICK_B_AIR:
00393         case LS_KICK_R_AIR:
00394         case LS_KICK_L_AIR:
00395         case LS_HILT_BASH:
00396                 return qtrue;
00397         }
00398         return qfalse;
00399 }

int BG_KnockawayForParry int  move  ) 
 

Definition at line 763 of file bg_panimate.c.

References BLOCKED_LOWER_LEFT, BLOCKED_LOWER_RIGHT, BLOCKED_TOP, BLOCKED_UPPER_LEFT, BLOCKED_UPPER_RIGHT, LS_K1_BL, LS_K1_BR, LS_K1_T_, LS_K1_TL, and LS_K1_TR.

00764 {
00765         //FIXME: need actual anims for this
00766         //FIXME: need to know which side of the saber was hit!  For now, we presume the saber gets knocked away from the center
00767         switch ( move )
00768         {
00769         case BLOCKED_TOP://LS_PARRY_UP:
00770                 return LS_K1_T_;//push up
00771                 break;
00772         case BLOCKED_UPPER_RIGHT://LS_PARRY_UR:
00773         default://case LS_READY:
00774                 return LS_K1_TR;//push up, slightly to right
00775                 break;
00776         case BLOCKED_UPPER_LEFT://LS_PARRY_UL:
00777                 return LS_K1_TL;//push up and to left
00778                 break;
00779         case BLOCKED_LOWER_RIGHT://LS_PARRY_LR:
00780                 return LS_K1_BR;//push down and to left
00781                 break;
00782         case BLOCKED_LOWER_LEFT://LS_PARRY_LL:
00783                 return LS_K1_BL;//push down and to right
00784                 break;
00785         }
00786         //return LS_NONE;
00787 }

saberInfo_t * BG_MySaber int  clientNum,
int  saberNum
 

Definition at line 4097 of file bg_saber.c.

References centity_t, cg_entities, cgs, gentity_s::client, cgs_t::clientinfo, g_entities, gentity_t, clientInfo_t::infoValid, gentity_s::inuse, MAX_CLIENTS, saberInfo_t::model, centity_s::npcClient, NULL, clientInfo_t::saber, and gclient_s::saber.

04098 {
04099         //returns a pointer to the requested saberNum
04100 #ifdef QAGAME
04101         gentity_t *ent = &g_entities[clientNum];
04102         if ( ent->inuse && ent->client )
04103         {
04104                 if ( !ent->client->saber[saberNum].model 
04105                         || !ent->client->saber[saberNum].model[0] )
04106                 { //don't have saber anymore!
04107                         return NULL;
04108                 }
04109                 return &ent->client->saber[saberNum];
04110         }
04111 #elif defined CGAME
04112         clientInfo_t *ci = NULL;
04113         if (clientNum < MAX_CLIENTS)
04114         {
04115                 ci = &cgs.clientinfo[clientNum];
04116         }
04117         else
04118         {
04119                 centity_t *cent = &cg_entities[clientNum];
04120                 if (cent->npcClient)
04121                 {
04122                         ci = cent->npcClient;
04123                 }
04124         }
04125         if ( ci 
04126                 && ci->infoValid )
04127         {
04128                 if ( !ci->saber[saberNum].model 
04129                         || !ci->saber[saberNum].model[0] )
04130                 { //don't have sabers anymore!
04131                         return NULL;
04132                 }
04133                 return &ci->saber[saberNum];
04134         }
04135 #endif
04136 
04137         return NULL;
04138 }

int BG_ParseAnimationEvtFile const char *  as_filename,
int  animFileIndex,
int  eventFileIndex
 

Definition at line 2169 of file bg_panimate.c.

References AED_ARRAY_SIZE, AEV_NONE, animation_t, animevent_t, bgLoadedAnim_t::anims, bgAllAnims, bgAllEvents, bgNumAnimEvents, Com_Error(), COM_Parse(), Com_Printf(), Com_sprintf(), ERR_DROP, animevent_s::eventData, bgLoadedEvents_t::eventsParsed, animevent_s::eventType, fileHandle_t, FS_READ, animevent_s::keyFrame, bgLoadedEvents_t::legsAnimEvents, MAX_ANIM_EVENTS, MAX_ANIM_FILES, MAX_QPATH, NULL, ParseAnimationEvtBlock(), Q_stricmp(), qtrue, strcpy(), animevent_s::stringData, bgLoadedEvents_t::torsoAnimEvents, trap_FS_FCloseFile(), trap_FS_FOpenFile(), trap_FS_Read(), and va().

Referenced by CG_CacheG2AnimInfo(), CG_G2AnimEntModelLoad(), and CG_G2EvIndexForModel().

02170 {
02171         const char      *text_p;
02172         int                     len;
02173         const char      *token;
02174         char            text[80000];
02175         char            sfilename[MAX_QPATH];
02176         fileHandle_t    f;
02177         int                     i, j, upper_i, lower_i;
02178         int                             usedIndex = -1;
02179         animevent_t     *legsAnimEvents;
02180         animevent_t     *torsoAnimEvents;
02181         animation_t             *animations;
02182         int                             forcedIndex;
02183         
02184         assert(animFileIndex < MAX_ANIM_FILES);
02185         assert(eventFileIndex < MAX_ANIM_FILES);
02186 
02187         if (eventFileIndex == -1)
02188         {
02189                 forcedIndex = 0;
02190         }
02191         else
02192         {
02193                 forcedIndex = eventFileIndex;
02194         }
02195 
02196         if (bg_animParseIncluding <= 0)
02197         { //if we should be parsing an included file, skip this part
02198                 if ( bgAllEvents[forcedIndex].eventsParsed )
02199                 {//already cached this one
02200                         return forcedIndex;
02201                 }
02202         }
02203 
02204         legsAnimEvents = bgAllEvents[forcedIndex].legsAnimEvents;
02205         torsoAnimEvents = bgAllEvents[forcedIndex].torsoAnimEvents;
02206         animations = bgAllAnims[animFileIndex].anims;
02207 
02208         if (bg_animParseIncluding <= 0)
02209         { //if we should be parsing an included file, skip this part
02210                 //Go through and see if this filename is already in the table.
02211                 i = 0;
02212                 while (i < bgNumAnimEvents && forcedIndex != 0)
02213                 {
02214                         if (!Q_stricmp(as_filename, bgAllEvents[i].filename))
02215                         { //looks like we have it already.
02216                                 return i;
02217                         }
02218                         i++;
02219                 }
02220         }
02221 
02222         // Load and parse animevents.cfg file
02223         Com_sprintf( sfilename, sizeof( sfilename ), "%sanimevents.cfg", as_filename );
02224 
02225         if (bg_animParseIncluding <= 0)
02226         { //should already be done if we're including
02227                 //initialize anim event array
02228                 for( i = 0; i < MAX_ANIM_EVENTS; i++ )
02229                 {
02230                         //Type of event
02231                         torsoAnimEvents[i].eventType = AEV_NONE;
02232                         legsAnimEvents[i].eventType = AEV_NONE;
02233                         //Frame to play event on
02234                         torsoAnimEvents[i].keyFrame = -1;       
02235                         legsAnimEvents[i].keyFrame = -1;
02236                         //we allow storage of one string, temporarily (in case we have to look up an index later, then make sure to set stringData to NULL so we only do the look-up once)
02237                         torsoAnimEvents[i].stringData = NULL;
02238                         legsAnimEvents[i].stringData = NULL;
02239                         //Unique IDs, can be soundIndex of sound file to play OR effect index or footstep type, etc.
02240                         for ( j = 0; j < AED_ARRAY_SIZE; j++ )
02241                         {
02242                                 torsoAnimEvents[i].eventData[j] = -1;
02243                                 legsAnimEvents[i].eventData[j] = -1;
02244                         }
02245                 }
02246         }
02247 
02248         // load the file
02249         len = trap_FS_FOpenFile( sfilename, &f, FS_READ );
02250         if ( len <= 0 ) 
02251         {//no file
02252                 goto fin;
02253         }
02254         if ( len >= sizeof( text ) - 1 ) 
02255         {
02256                 trap_FS_FCloseFile(f);
02257 #ifndef FINAL_BUILD
02258                 Com_Error(ERR_DROP, "File %s too long\n", sfilename );
02259 #else
02260                 Com_Printf( "File %s too long\n", sfilename );
02261 #endif
02262                 goto fin;
02263         }
02264 
02265         trap_FS_Read( text, len, f );
02266         text[len] = 0;
02267         trap_FS_FCloseFile( f );
02268 
02269         // parse the text
02270         text_p = text;
02271         upper_i =0;
02272         lower_i =0;
02273 
02274         // read information for batches of sounds (UPPER or LOWER)
02275         while ( 1 ) 
02276         {
02277                 // Get base frame of sequence
02278                 token = COM_Parse( &text_p );
02279                 if ( !token || !token[0] ) 
02280                 {
02281                         break;
02282                 }
02283 
02284                 if ( !Q_stricmp(token,"include") )      // grab from another animevents.cfg
02285                 {//NOTE: you REALLY should NOT do this after the main block of UPPERSOUNDS and LOWERSOUNDS
02286                         const char      *include_filename = COM_Parse( &text_p );
02287                         if ( include_filename != NULL )
02288                         {
02289                                 char fullIPath[MAX_QPATH];
02290                                 strcpy(fullIPath, va("models/players/%s/", include_filename));
02291                                 bg_animParseIncluding++;
02292                                 BG_ParseAnimationEvtFile( fullIPath, animFileIndex, forcedIndex );
02293                                 bg_animParseIncluding--;
02294                         }
02295                 }
02296 
02297                 if ( !Q_stricmp(token,"UPPEREVENTS") )  // A batch of upper sounds
02298                 {
02299                         ParseAnimationEvtBlock( as_filename, torsoAnimEvents, animations, &upper_i, &text_p ); 
02300                 }
02301 
02302                 else if ( !Q_stricmp(token,"LOWEREVENTS") )     // A batch of lower sounds
02303                 {
02304                         ParseAnimationEvtBlock( as_filename, legsAnimEvents, animations, &lower_i, &text_p ); 
02305                 }
02306         }
02307 
02308         usedIndex = forcedIndex;
02309 fin:
02310         //Mark this anim set so that we know we tried to load he sounds, don't care if the load failed
02311         if (bg_animParseIncluding <= 0)
02312         { //if we should be parsing an included file, skip this part
02313                 bgAllEvents[forcedIndex].eventsParsed = qtrue;
02314                 strcpy(bgAllEvents[forcedIndex].filename, as_filename);
02315                 if (forcedIndex)
02316                 {
02317                         bgNumAnimEvents++;
02318                 }
02319         }
02320 
02321         return usedIndex;
02322 }

int BG_ParseAnimationFile const char *  filename,
animation_t animset,
qboolean  isHumanoid
 

Definition at line 2334 of file bg_panimate.c.

References animation_t, bgLoadedAnim_t::anims, animTable, atof(), atoi(), BG_AnimsetAlloc(), BG_AnimsetFree(), bgAllAnims, bgHumanoidAnimations, bgNumAllAnims, BGPAFtextLoaded, ceil(), Com_Error(), COM_Parse(), COM_ParseExt(), Com_Printf(), ERR_DROP, fileHandle_t, animation_s::firstFrame, floor(), animation_s::frameLerp, FS_READ, GetIDForString(), animation_s::loopFrames, MAX_ANIMATIONS, animation_s::numFrames, Q_stricmp(), qboolean, qfalse, qtrue, S_COLOR_RED, strcpy(), strstr(), trap_FS_FCloseFile(), trap_FS_FOpenFile(), and trap_FS_Read().

Referenced by CG_CacheG2AnimInfo(), CG_G2AnimEntModelLoad(), CG_G2SkelForModel(), G_ParseAnimFileSet(), NPC_VehiclePrecache(), SetupGameGhoul2Model(), SP_worldspawn(), and UI_ParseAnimationFile().

02335 {
02336         char            *text_p;
02337         int                     len;
02338         int                     i;
02339         char            *token;
02340         float           fps;
02341         int                     skip;
02342         int                     usedIndex = -1;
02343         int                     nextIndex = bgNumAllAnims;
02344         qboolean        dynAlloc = qfalse;
02345         qboolean        wasLoaded = qfalse;
02346 #ifndef Q3_VM
02347         char            BGPAFtext[60000];
02348 #endif
02349 
02350         fileHandle_t    f;
02351         int                             animNum;
02352 
02353         if (!isHumanoid)
02354         {
02355                 i = 0;
02356                 while (i < bgNumAllAnims)
02357                 { //see if it's been loaded already
02358                         if (!Q_stricmp(bgAllAnims[i].filename, filename))
02359                         {
02360                                 animset = bgAllAnims[i].anims;
02361                                 return i; //alright, we already have it.
02362                         }
02363                         i++;
02364                 }
02365 
02366                 //Looks like it has not yet been loaded. Allocate space for the anim set if we need to, and continue along.
02367                 if (!animset)
02368                 {
02369                         if (strstr(filename, "players/_humanoid/"))
02370                         { //then use the static humanoid set.
02371                                 animset = bgHumanoidAnimations;
02372                                 nextIndex = 0;
02373                         }
02374                         else if (strstr(filename, "players/rockettrooper/"))
02375                         { //rockettrooper always index 1
02376                                 nextIndex = 1;
02377                                 animset = BG_AnimsetAlloc();
02378                                 dynAlloc = qtrue; //so we know to free this memory in case we have to return early. Don't want any leaks.
02379 
02380                                 if (!animset)
02381                                 {
02382                                         assert(!"Anim set alloc failed!");
02383                                         return -1;
02384                                 }
02385                         }
02386                         else
02387                         {
02388                                 animset = BG_AnimsetAlloc();
02389                                 dynAlloc = qtrue; //so we know to free this memory in case we have to return early. Don't want any leaks.
02390 
02391                                 if (!animset)
02392                                 {
02393                                         assert(!"Anim set alloc failed!");
02394                                         return -1;
02395                                 }
02396                         }
02397                 }
02398         }
02399 #ifdef _DEBUG
02400         else
02401         {
02402                 assert(animset);
02403         }
02404 #endif
02405 
02406         // load the file
02407         if (!BGPAFtextLoaded || !isHumanoid)
02408         { //rww - We are always using the same animation config now. So only load it once.
02409                 len = trap_FS_FOpenFile( filename, &f, FS_READ );
02410                 if ( (len <= 0) || (len >= sizeof( BGPAFtext ) - 1) ) 
02411                 {
02412                         if (dynAlloc)
02413                         {
02414                                 BG_AnimsetFree(animset);
02415                         }
02416                         if (len > 0)
02417                         {
02418                                 Com_Error(ERR_DROP, "%s exceeds the allowed game-side animation buffer!", filename);
02419                         }
02420                         return -1;
02421                 }
02422 
02423                 trap_FS_Read( BGPAFtext, len, f );
02424                 BGPAFtext[len] = 0;
02425                 trap_FS_FCloseFile( f );
02426         }
02427         else
02428         {
02429                 if (dynAlloc)
02430                 {
02431                         assert(!"Should not have allocated dynamically for humanoid");
02432                         BG_AnimsetFree(animset);
02433                 }
02434                 return 0; //humanoid index
02435         }
02436 
02437         // parse the text
02438         text_p = BGPAFtext;
02439         skip = 0;       // quiet the compiler warning
02440 
02441         //FIXME: have some way of playing anims backwards... negative numFrames?
02442 
02443         //initialize anim array so that from 0 to MAX_ANIMATIONS, set default values of 0 1 0 100
02444         for(i = 0; i < MAX_ANIMATIONS; i++)
02445         {
02446                 animset[i].firstFrame = 0;
02447                 animset[i].numFrames = 0;
02448                 animset[i].loopFrames = -1;
02449                 animset[i].frameLerp = 100;
02450         }
02451 
02452         // read information for each frame
02453         while(1) 
02454         {
02455                 token = COM_Parse( (const char **)(&text_p) );
02456 
02457                 if ( !token || !token[0]) 
02458                 {
02459                         break;
02460                 }
02461 
02462                 animNum = GetIDForString(animTable, token);
02463                 if(animNum == -1)
02464                 {
02465 //#ifndef FINAL_BUILD
02466 #ifdef _DEBUG
02467                         Com_Printf(S_COLOR_RED"WARNING: Unknown token %s in %s\n", token, filename);
02468                         while (token[0])
02469                         {
02470                                 token = COM_ParseExt( (const char **) &text_p, qfalse );        //returns empty string when next token is EOL
02471                         }
02472 #endif
02473                         continue;
02474                 }
02475 
02476                 token = COM_Parse( (const char **)(&text_p) );
02477                 if ( !token ) 
02478                 {
02479                         break;
02480                 }
02481                 animset[animNum].firstFrame = atoi( token );
02482 
02483                 token = COM_Parse( (const char **)(&text_p) );
02484                 if ( !token ) 
02485                 {
02486                         break;
02487                 }
02488                 animset[animNum].numFrames = atoi( token );
02489 
02490                 token = COM_Parse( (const char **)(&text_p) );
02491                 if ( !token ) 
02492                 {
02493                         break;
02494                 }
02495                 animset[animNum].loopFrames = atoi( token );
02496 
02497                 token = COM_Parse( (const char **)(&text_p) );
02498                 if ( !token ) 
02499                 {
02500                         break;
02501                 }
02502                 fps = atof( token );
02503                 if ( fps == 0 ) 
02504                 {
02505                         fps = 1;//Don't allow divide by zero error
02506                 }
02507                 if ( fps < 0 )
02508                 {//backwards
02509                         animset[animNum].frameLerp = floor(1000.0f / fps);
02510                 }
02511                 else
02512                 {
02513                         animset[animNum].frameLerp = ceil(1000.0f / fps);
02514                 }
02515         }
02516 /*
02517 #ifdef _DEBUG
02518         //Check the array, and print the ones that have nothing in them.
02519         for(i = 0; i < MAX_ANIMATIONS; i++)
02520         {       
02521                 if (animTable[i].name != NULL)          // This animation reference exists.
02522                 {
02523                         if (animset[i].firstFrame <= 0 && animset[i].numFrames <=0)
02524                         {       // This is an empty animation reference.
02525                                 Com_Printf("***ANIMTABLE reference #%d (%s) is empty!\n", i, animTable[i].name);
02526                         }
02527                 }
02528         }
02529 #endif // _DEBUG
02530 */
02531 #ifdef CONVENIENT_ANIMATION_FILE_DEBUG_THING
02532         SpewDebugStuffToFile();
02533 #endif
02534 
02535         wasLoaded = BGPAFtextLoaded;
02536 
02537         if (isHumanoid)
02538         {
02539                 bgAllAnims[0].anims = animset;
02540                 strcpy(bgAllAnims[0].filename, filename);
02541                 BGPAFtextLoaded = qtrue;
02542 
02543                 usedIndex = 0;
02544         }
02545         else
02546         {
02547                 bgAllAnims[nextIndex].anims = animset;
02548                 strcpy(bgAllAnims[nextIndex].filename, filename);
02549 
02550                 usedIndex = bgNumAllAnims;
02551 
02552                 if (nextIndex > 1)
02553                 { //don't bother increasing the number if this ended up as a humanoid/rockettrooper load.
02554                         bgNumAllAnims++;
02555                 }
02556                 else
02557                 {
02558                         BGPAFtextLoaded = qtrue;
02559                         usedIndex = nextIndex;
02560                 }
02561         }
02562 
02563         /*
02564         if (!wasLoaded && BGPAFtextLoaded)
02565         { //just loaded humanoid skel - we always want the rockettrooper to be after it, in slot 1
02566 #ifdef _DEBUG
02567                 assert(BG_ParseAnimationFile("models/players/rockettrooper/animation.cfg", NULL, qfalse) == 1);
02568 #else
02569                 BG_ParseAnimationFile("models/players/rockettrooper/animation.cfg", NULL, qfalse);
02570 #endif
02571         }
02572         */
02573 
02574         return usedIndex;
02575 }

int BG_PickAnim int  animIndex,
int  minAnim,
int  maxAnim
 

Definition at line 2952 of file bg_panimate.c.

References BG_HasAnimation(), and Q_irand().

Referenced by G_PickDeathAnim(), and NPC_ChoosePainAnimation().

02953 {
02954         int anim;
02955         int count = 0;
02956 
02957         do
02958         {
02959                 anim = Q_irand(minAnim, maxAnim);
02960                 count++;
02961         }
02962         while ( !BG_HasAnimation( animIndex, anim ) && count < 1000 );
02963 
02964         if (count == 1000)
02965         { //guess we just don't have a death anim then.
02966                 return -1;
02967         }
02968 
02969         return anim;
02970 }

qboolean BG_SaberInAttack int  move  ) 
 

Definition at line 227 of file bg_panimate.c.

References LS_A1_SPECIAL, LS_A2_SPECIAL, LS_A3_SPECIAL, LS_A_BACK, LS_A_BACK_CR, LS_A_BACKFLIP_ATK, LS_A_BACKSTAB, LS_A_FLIP_SLASH, LS_A_FLIP_STAB, LS_A_JUMP_T__B_, LS_A_LUNGE, LS_A_T2B, LS_A_TL2BR, LS_BUTTERFLY_LEFT, LS_BUTTERFLY_RIGHT, LS_DUAL_FB, LS_DUAL_LR, LS_DUAL_SPIN_PROTECT, LS_HILT_BASH, LS_JUMPATTACK_ARIAL_LEFT, LS_JUMPATTACK_ARIAL_RIGHT, LS_JUMPATTACK_CART_LEFT, LS_JUMPATTACK_CART_RIGHT, LS_JUMPATTACK_DUAL, LS_JUMPATTACK_STAFF_LEFT, LS_JUMPATTACK_STAFF_RIGHT, LS_KICK_B, LS_KICK_B_AIR, LS_KICK_BF, LS_KICK_F, LS_KICK_F_AIR, LS_KICK_L, LS_KICK_L_AIR, LS_KICK_R, LS_KICK_R_AIR, LS_KICK_RL, LS_KICK_S, LS_LEAP_ATTACK, LS_PULL_ATTACK_STAB, LS_PULL_ATTACK_SWING, LS_ROLL_STAB, LS_SPINATTACK, LS_SPINATTACK_ALORA, LS_SPINATTACK_DUAL, LS_STABDOWN, LS_STABDOWN_DUAL, LS_STABDOWN_STAFF, LS_STAFF_SOULCAL, LS_SWOOP_ATTACK_LEFT, LS_SWOOP_ATTACK_RIGHT, LS_TAUNTAUN_ATTACK_LEFT, LS_TAUNTAUN_ATTACK_RIGHT, LS_UPSIDE_DOWN_ATTACK, qboolean, qfalse, and qtrue.

Referenced by BG_AdjustClientSpeed(), CG_AddSaberBlade(), ClientThink_real(), G_SPSaberDamageTraceLerped(), Jedi_CheckFlipEvasions(), Jedi_SaberBlockGo(), Jedi_SaberBusy(), PM_SaberAttackForMovement(), PM_SetSaberMove(), PM_WeaponLightsaber(), WP_SaberCanBlock(), WP_SaberPositionUpdate(), and WP_SaberStartMissileBlockCheck().

00228 {
00229         if ( move >= LS_A_TL2BR && move <= LS_A_T2B )
00230         {
00231                 return qtrue;
00232         }
00233         switch ( move )
00234         {
00235         case LS_A_BACK:
00236         case LS_A_BACK_CR:
00237         case LS_A_BACKSTAB:
00238         case LS_ROLL_STAB:
00239         case LS_A_LUNGE:
00240         case LS_A_JUMP_T__B_:
00241         case LS_A_FLIP_STAB:
00242         case LS_A_FLIP_SLASH:
00243         case LS_JUMPATTACK_DUAL:
00244         case LS_JUMPATTACK_ARIAL_LEFT:
00245         case LS_JUMPATTACK_ARIAL_RIGHT:
00246         case LS_JUMPATTACK_CART_LEFT:
00247         case LS_JUMPATTACK_CART_RIGHT:
00248         case LS_JUMPATTACK_STAFF_LEFT:
00249         case LS_JUMPATTACK_STAFF_RIGHT:
00250         case LS_BUTTERFLY_LEFT:
00251         case LS_BUTTERFLY_RIGHT:
00252         case LS_A_BACKFLIP_ATK:
00253         case LS_SPINATTACK_DUAL:
00254         case LS_SPINATTACK:
00255         case LS_LEAP_ATTACK:
00256         case LS_SWOOP_ATTACK_RIGHT:
00257         case LS_SWOOP_ATTACK_LEFT:
00258         case LS_TAUNTAUN_ATTACK_RIGHT:
00259         case LS_TAUNTAUN_ATTACK_LEFT:
00260         case LS_KICK_F:
00261         case LS_KICK_B:
00262         case LS_KICK_R:
00263         case LS_KICK_L:
00264         case LS_KICK_S:
00265         case LS_KICK_BF:
00266         case LS_KICK_RL:
00267         case LS_KICK_F_AIR:
00268         case LS_KICK_B_AIR:
00269         case LS_KICK_R_AIR:
00270         case LS_KICK_L_AIR:
00271         case LS_STABDOWN:
00272         case LS_STABDOWN_STAFF:
00273         case LS_STABDOWN_DUAL:
00274         case LS_DUAL_SPIN_PROTECT:
00275         case LS_STAFF_SOULCAL:
00276         case LS_A1_SPECIAL:
00277         case LS_A2_SPECIAL:
00278         case LS_A3_SPECIAL:
00279         case LS_UPSIDE_DOWN_ATTACK:
00280         case LS_PULL_ATTACK_STAB:
00281         case LS_PULL_ATTACK_SWING:
00282         case LS_SPINATTACK_ALORA:
00283         case LS_DUAL_FB:
00284         case LS_DUAL_LR:
00285         case LS_HILT_BASH:
00286                 return qtrue;
00287                 break;
00288         }
00289         return qfalse;
00290 }

qboolean BG_SaberInAttackPure int  move  ) 
 

Definition at line 219 of file bg_panimate.c.

References LS_A_T2B, LS_A_TL2BR, qboolean, qfalse, and qtrue.

00220 {
00221         if ( move >= LS_A_TL2BR && move <= LS_A_T2B )
00222         {
00223                 return qtrue;
00224         }
00225         return qfalse;
00226 }

qboolean BG_SaberInIdle int  move  ) 
 

Definition at line 401 of file bg_panimate.c.

References LS_DRAW, LS_NONE, LS_PUTAWAY, LS_READY, qboolean, qfalse, and qtrue.

Referenced by PM_SetSaberMove().

00402 {
00403         switch ( move )
00404         {
00405         case LS_NONE:
00406         case LS_READY:
00407         case LS_DRAW:
00408         case LS_PUTAWAY:
00409                 return qtrue;
00410                 break;
00411         }
00412         return qfalse;
00413 }

qboolean BG_SaberInKata int  saberMove  ) 
 

Definition at line 292 of file bg_panimate.c.

References LS_A1_SPECIAL, LS_A2_SPECIAL, LS_A3_SPECIAL, LS_DUAL_SPIN_PROTECT, LS_STAFF_SOULCAL, qboolean, qfalse, and qtrue.

Referenced by PM_CanDoKata(), PmoveSingle(), and SaberCombatHandling().

00293 {
00294         switch ( saberMove )
00295         {
00296         case LS_A1_SPECIAL:
00297         case LS_A2_SPECIAL:
00298         case LS_A3_SPECIAL:
00299         case LS_DUAL_SPIN_PROTECT:
00300         case LS_STAFF_SOULCAL:
00301                 return qtrue;
00302         }
00303         return qfalse;
00304 }

qboolean BG_SaberInReturn int  move  ) 
 

Definition at line 1202 of file bg_panimate.c.

References PM_SaberInReturn(), and qboolean.

01203 {
01204         return PM_SaberInReturn( move );
01205 }

qboolean BG_SaberInSpecial int  move  ) 
 

Definition at line 320 of file bg_panimate.c.

References LS_A1_SPECIAL, LS_A2_SPECIAL, LS_A3_SPECIAL, LS_A_BACK, LS_A_BACK_CR, LS_A_BACKFLIP_ATK, LS_A_BACKSTAB, LS_A_FLIP_SLASH, LS_A_FLIP_STAB, LS_A_JUMP_T__B_, LS_A_LUNGE, LS_BUTTERFLY_LEFT, LS_BUTTERFLY_RIGHT, LS_DUAL_FB, LS_DUAL_LR, LS_DUAL_SPIN_PROTECT, LS_HILT_BASH, LS_JUMPATTACK_ARIAL_LEFT, LS_JUMPATTACK_ARIAL_RIGHT, LS_JUMPATTACK_CART_LEFT, LS_JUMPATTACK_CART_RIGHT, LS_JUMPATTACK_DUAL, LS_JUMPATTACK_STAFF_LEFT, LS_JUMPATTACK_STAFF_RIGHT, LS_KICK_B, LS_KICK_B_AIR, LS_KICK_BF, LS_KICK_F, LS_KICK_F_AIR, LS_KICK_L, LS_KICK_L_AIR, LS_KICK_R, LS_KICK_R_AIR, LS_KICK_RL, LS_KICK_S, LS_LEAP_ATTACK, LS_PULL_ATTACK_STAB, LS_PULL_ATTACK_SWING, LS_ROLL_STAB, LS_SPINATTACK, LS_SPINATTACK_ALORA, LS_SPINATTACK_DUAL, LS_STABDOWN, LS_STABDOWN_DUAL, LS_STABDOWN_STAFF, LS_STAFF_SOULCAL, LS_SWOOP_ATTACK_LEFT, LS_SWOOP_ATTACK_RIGHT, LS_TAUNTAUN_ATTACK_LEFT, LS_TAUNTAUN_ATTACK_RIGHT, LS_UPSIDE_DOWN_ATTACK, qboolean, qfalse, and qtrue.

Referenced by BG_G2PlayerAngles(), ForcePowerUsableOn(), PM_ForceJumpingUp(), PM_SetSaberMove(), SaberCombatHandling(), and WP_ForcePowersUpdate().

00321 {
00322         switch( move )
00323         {
00324         case LS_A_BACK:
00325         case LS_A_BACK_CR:
00326         case LS_A_BACKSTAB:
00327         case LS_ROLL_STAB:
00328         case LS_A_LUNGE:
00329         case LS_A_JUMP_T__B_:
00330         case LS_A_FLIP_STAB:
00331         case LS_A_FLIP_SLASH:
00332         case LS_JUMPATTACK_DUAL:
00333         case LS_JUMPATTACK_ARIAL_LEFT:
00334         case LS_JUMPATTACK_ARIAL_RIGHT:
00335         case LS_JUMPATTACK_CART_LEFT:
00336         case LS_JUMPATTACK_CART_RIGHT:
00337         case LS_JUMPATTACK_STAFF_LEFT:
00338         case LS_JUMPATTACK_STAFF_RIGHT:
00339         case LS_BUTTERFLY_LEFT:
00340         case LS_BUTTERFLY_RIGHT:
00341         case LS_A_BACKFLIP_ATK:
00342         case LS_SPINATTACK_DUAL:
00343         case LS_SPINATTACK:
00344         case LS_LEAP_ATTACK:
00345         case LS_SWOOP_ATTACK_RIGHT:
00346         case LS_SWOOP_ATTACK_LEFT:
00347         case LS_TAUNTAUN_ATTACK_RIGHT:
00348         case LS_TAUNTAUN_ATTACK_LEFT:
00349         case LS_KICK_F:
00350         case LS_KICK_B:
00351         case LS_KICK_R:
00352         case LS_KICK_L:
00353         case LS_KICK_S:
00354         case LS_KICK_BF:
00355         case LS_KICK_RL:
00356         case LS_KICK_F_AIR:
00357         case LS_KICK_B_AIR:
00358         case LS_KICK_R_AIR:
00359         case LS_KICK_L_AIR:
00360         case LS_STABDOWN:
00361         case LS_STABDOWN_STAFF:
00362         case LS_STABDOWN_DUAL:
00363         case LS_DUAL_SPIN_PROTECT:
00364         case LS_STAFF_SOULCAL:
00365         case LS_A1_SPECIAL:
00366         case LS_A2_SPECIAL:
00367         case LS_A3_SPECIAL:
00368         case LS_UPSIDE_DOWN_ATTACK:
00369         case LS_PULL_ATTACK_STAB:
00370         case LS_PULL_ATTACK_SWING:
00371         case LS_SPINATTACK_ALORA:
00372         case LS_DUAL_FB:
00373         case LS_DUAL_LR:
00374         case LS_HILT_BASH:
00375                 return qtrue;
00376         }
00377         return qfalse;
00378 }

qboolean BG_SaberInSpecialAttack int  anim  ) 
 

Definition at line 587 of file bg_panimate.c.

References BOTH_A1_SPECIAL, BOTH_A2_SPECIAL, BOTH_A2_STABBACK1, BOTH_A3_SPECIAL, BOTH_A6_FB, BOTH_A6_LR, BOTH_A6_SABERPROTECT, BOTH_A7_HILT, BOTH_A7_KICK_B, BOTH_A7_KICK_B_AIR, BOTH_A7_KICK_BF, BOTH_A7_KICK_F, BOTH_A7_KICK_F_AIR, BOTH_A7_KICK_L, BOTH_A7_KICK_L_AIR, BOTH_A7_KICK_R, BOTH_A7_KICK_R_AIR, BOTH_A7_KICK_RL, BOTH_A7_KICK_S, BOTH_A7_SOULCAL, BOTH_ALORA_SPIN_SLASH, BOTH_ATTACK_BACK, BOTH_BUTTERFLY_FL1, BOTH_BUTTERFLY_FR1, BOTH_BUTTERFLY_LEFT, BOTH_BUTTERFLY_RIGHT, BOTH_CROUCHATTACKBACK1, BOTH_FJSS_TL_BR, BOTH_FJSS_TR_BL, BOTH_FLIP_ATTACK7, BOTH_FORCELEAP2_T__B_, BOTH_FORCELONGLEAP_ATTACK, BOTH_JUMPATTACK6, BOTH_JUMPATTACK7, BOTH_JUMPFLIPSLASHDOWN1, BOTH_JUMPFLIPSTABDOWN, BOTH_LUNGE2_B__T_, BOTH_PULL_IMPALE_STAB, BOTH_PULL_IMPALE_SWING, BOTH_ROLL_STAB, BOTH_SPINATTACK6, BOTH_SPINATTACK7, BOTH_STABDOWN, BOTH_STABDOWN_DUAL, BOTH_STABDOWN_STAFF, BOTH_VS_ATL_S, BOTH_VS_ATR_S, BOTH_VT_ATL_S, BOTH_VT_ATR_S, qboolean, qfalse, and qtrue.

Referenced by G_SPSaberDamageTraceLerped(), Jedi_CheckFlipEvasions(), Jedi_SaberBlockGo(), Jedi_SaberBusy(), NPC_ChoosePainAnimation(), PM_ForceJumpingUp(), PM_SaberAttackForMovement(), PM_SetSaberMove(), and WP_SaberStartMissileBlockCheck().

00588 {
00589         switch ( anim )
00590         {
00591         case BOTH_A2_STABBACK1:
00592         case BOTH_ATTACK_BACK:
00593         case BOTH_CROUCHATTACKBACK1:
00594         case BOTH_ROLL_STAB:
00595         case BOTH_BUTTERFLY_LEFT:
00596         case BOTH_BUTTERFLY_RIGHT:
00597         case BOTH_BUTTERFLY_FL1:
00598         case BOTH_BUTTERFLY_FR1:
00599         case BOTH_FJSS_TR_BL:
00600         case BOTH_FJSS_TL_BR:
00601         case BOTH_LUNGE2_B__T_:
00602         case BOTH_FORCELEAP2_T__B_:
00603         case BOTH_JUMPFLIPSLASHDOWN1://#
00604         case BOTH_JUMPFLIPSTABDOWN://#
00605         case BOTH_JUMPATTACK6:
00606         case BOTH_JUMPATTACK7:
00607         case BOTH_SPINATTACK6:
00608         case BOTH_SPINATTACK7:
00609         case BOTH_FORCELONGLEAP_ATTACK:
00610         case BOTH_VS_ATR_S:
00611         case BOTH_VS_ATL_S:
00612         case BOTH_VT_ATR_S:
00613         case BOTH_VT_ATL_S:
00614         case BOTH_A7_KICK_F:
00615         case BOTH_A7_KICK_B:
00616         case BOTH_A7_KICK_R:
00617         case BOTH_A7_KICK_L:
00618         case BOTH_A7_KICK_S:
00619         case BOTH_A7_KICK_BF:
00620         case BOTH_A7_KICK_RL:
00621         case BOTH_A7_KICK_F_AIR:
00622         case BOTH_A7_KICK_B_AIR:
00623         case BOTH_A7_KICK_R_AIR:
00624         case BOTH_A7_KICK_L_AIR:
00625         case BOTH_STABDOWN:
00626         case BOTH_STABDOWN_STAFF:
00627         case BOTH_STABDOWN_DUAL:
00628         case BOTH_A6_SABERPROTECT:
00629         case BOTH_A7_SOULCAL:
00630         case BOTH_A1_SPECIAL:
00631         case BOTH_A2_SPECIAL:
00632         case BOTH_A3_SPECIAL:
00633         case BOTH_FLIP_ATTACK7:
00634         case BOTH_PULL_IMPALE_STAB:
00635         case BOTH_PULL_IMPALE_SWING:
00636         case BOTH_ALORA_SPIN_SLASH:
00637         case BOTH_A6_FB:
00638         case BOTH_A6_LR:        
00639         case BOTH_A7_HILT:
00640                 return qtrue;
00641         }
00642         return qfalse;
00643 }

qboolean BG_SaberInTransitionAny int  move  ) 
 

Definition at line 1619 of file bg_panimate.c.

References PM_SaberInReturn(), PM_SaberInStart(), PM_SaberInTransition(), qboolean, qfalse, and qtrue.

Referenced by PM_SaberAttackForMovement(), and WP_SaberStartMissileBlockCheck().

01620 {
01621         if ( PM_SaberInStart( move ) )
01622         {
01623                 return qtrue;
01624         }
01625         else if ( PM_SaberInTransition( move ) )
01626         {
01627                 return qtrue;
01628         }
01629         else if ( PM_SaberInReturn( move ) )
01630         {
01631                 return qtrue;
01632         }
01633         return qfalse;
01634 }

qboolean BG_SaberLockBreakAnim int  anim  ) 
 

Definition at line 1487 of file bg_panimate.c.

References BG_SuperBreakLoseAnim(), BG_SuperBreakWinAnim(), BOTH_BF1BREAK, BOTH_BF2BREAK, BOTH_CCWCIRCLEBREAK, BOTH_CWCIRCLEBREAK, BOTH_LK_DL_DL_S_B_1_L, BOTH_LK_DL_DL_S_B_1_W, BOTH_LK_DL_DL_T_B_1_L, BOTH_LK_DL_DL_T_B_1_W, BOTH_LK_DL_S_S_B_1_L, BOTH_LK_DL_S_S_B_1_W, BOTH_LK_DL_S_T_B_1_L, BOTH_LK_DL_S_T_B_1_W, BOTH_LK_DL_ST_S_B_1_L, BOTH_LK_DL_ST_S_B_1_W, BOTH_LK_DL_ST_T_B_1_L, BOTH_LK_DL_ST_T_B_1_W, BOTH_LK_S_DL_S_B_1_L, BOTH_LK_S_DL_S_B_1_W, BOTH_LK_S_DL_T_B_1_L, BOTH_LK_S_DL_T_B_1_W, BOTH_LK_S_S_S_B_1_L, BOTH_LK_S_S_S_B_1_W, BOTH_LK_S_S_T_B_1_L, BOTH_LK_S_S_T_B_1_W, BOTH_LK_S_ST_S_B_1_L, BOTH_LK_S_ST_S_B_1_W, BOTH_LK_S_ST_T_B_1_L, BOTH_LK_S_ST_T_B_1_W, BOTH_LK_ST_DL_S_B_1_L, BOTH_LK_ST_DL_S_B_1_W, BOTH_LK_ST_DL_T_B_1_L, BOTH_LK_ST_DL_T_B_1_W, BOTH_LK_ST_S_S_B_1_L, BOTH_LK_ST_S_S_B_1_W, BOTH_LK_ST_S_T_B_1_L, BOTH_LK_ST_S_T_B_1_W, BOTH_LK_ST_ST_S_B_1_L, BOTH_LK_ST_ST_S_B_1_W, BOTH_LK_ST_ST_T_B_1_L, BOTH_LK_ST_ST_T_B_1_W, qboolean, and qtrue.

Referenced by BG_G2PlayerAngles(), and PmoveSingle().

01488 {
01489         switch ( anim )
01490         {
01491         case BOTH_BF1BREAK:
01492         case BOTH_BF2BREAK:
01493         case BOTH_CWCIRCLEBREAK:
01494         case BOTH_CCWCIRCLEBREAK:
01495         case BOTH_LK_S_DL_S_B_1_L:      //normal break I lost
01496         case BOTH_LK_S_DL_S_B_1_W:      //normal break I won
01497         case BOTH_LK_S_DL_T_B_1_L:      //normal break I lost
01498         case BOTH_LK_S_DL_T_B_1_W:      //normal break I won
01499         case BOTH_LK_S_ST_S_B_1_L:      //normal break I lost
01500         case BOTH_LK_S_ST_S_B_1_W:      //normal break I won
01501         case BOTH_LK_S_ST_T_B_1_L:      //normal break I lost
01502         case BOTH_LK_S_ST_T_B_1_W:      //normal break I won
01503         case BOTH_LK_S_S_S_B_1_L:       //normal break I lost
01504         case BOTH_LK_S_S_S_B_1_W:       //normal break I won
01505         case BOTH_LK_S_S_T_B_1_L:       //normal break I lost
01506         case BOTH_LK_S_S_T_B_1_W:       //normal break I won
01507         case BOTH_LK_DL_DL_S_B_1_L:     //normal break I lost
01508         case BOTH_LK_DL_DL_S_B_1_W:     //normal break I won
01509         case BOTH_LK_DL_DL_T_B_1_L:     //normal break I lost
01510         case BOTH_LK_DL_DL_T_B_1_W:     //normal break I won
01511         case BOTH_LK_DL_ST_S_B_1_L:     //normal break I lost
01512         case BOTH_LK_DL_ST_S_B_1_W:     //normal break I won
01513         case BOTH_LK_DL_ST_T_B_1_L:     //normal break I lost
01514         case BOTH_LK_DL_ST_T_B_1_W:     //normal break I won
01515         case BOTH_LK_DL_S_S_B_1_L:      //normal break I lost
01516         case BOTH_LK_DL_S_S_B_1_W:      //normal break I won
01517         case BOTH_LK_DL_S_T_B_1_L:      //normal break I lost
01518         case BOTH_LK_DL_S_T_B_1_W:      //normal break I won
01519         case BOTH_LK_ST_DL_S_B_1_L:     //normal break I lost
01520         case BOTH_LK_ST_DL_S_B_1_W:     //normal break I won
01521         case BOTH_LK_ST_DL_T_B_1_L:     //normal break I lost
01522         case BOTH_LK_ST_DL_T_B_1_W:     //normal break I won
01523         case BOTH_LK_ST_ST_S_B_1_L:     //normal break I lost
01524         case BOTH_LK_ST_ST_S_B_1_W:     //normal break I won
01525         case BOTH_LK_ST_ST_T_B_1_L:     //normal break I lost
01526         case BOTH_LK_ST_ST_T_B_1_W:     //normal break I won
01527         case BOTH_LK_ST_S_S_B_1_L:      //normal break I lost
01528         case BOTH_LK_ST_S_S_B_1_W:      //normal break I won
01529         case BOTH_LK_ST_S_T_B_1_L:      //normal break I lost
01530         case BOTH_LK_ST_S_T_B_1_W:      //normal break I won
01531                 return qtrue;
01532                 break;
01533         }
01534         return (BG_SuperBreakLoseAnim(anim)||BG_SuperBreakWinAnim(anim));
01535 }

qboolean BG_SaberStanceAnim int  anim  ) 
 

Definition at line 33 of file bg_panimate.c.

References BOTH_SABERDUAL_STANCE, BOTH_SABERFAST_STANCE, BOTH_SABERSLOW_STANCE, BOTH_SABERSTAFF_STANCE, BOTH_STAND1, BOTH_STAND2, qboolean, qfalse, and qtrue.

Referenced by G_UpdateClientAnims().

00034 {
00035         switch ( anim )
00036         {
00037         case BOTH_STAND1://not really a saberstance anim, actually... "saber off" stance
00038         case BOTH_STAND2://single-saber, medium style
00039         case BOTH_SABERFAST_STANCE://single-saber, fast style
00040         case BOTH_SABERSLOW_STANCE://single-saber, strong style
00041         case BOTH_SABERSTAFF_STANCE://saber staff style
00042         case BOTH_SABERDUAL_STANCE://dual saber style
00043                 return qtrue;
00044                 break;
00045         }
00046         return qfalse;
00047 }

void BG_SaberStartTransAnim int  clientNum,
int  saberAnimLevel,
int  weapon,
int  anim,
float *  animSpeed,
int  broken
 

Definition at line 2728 of file bg_panimate.c.

References saberInfo_t::animSpeedScale, BG_MySaber(), BOTH_A1_T__B_, BOTH_ROLL_STAB, BOTH_T1_BL_TL, BOTH_T1_BR__R, BOTH_T2_BL_TL, BOTH_T2_BR__R, BOTH_T3_BL_TL, BOTH_T3_BR__R, BROKENLIMB_LARM, BROKENLIMB_RARM, FORCE_LEVEL_1, FORCE_LEVEL_3, PM_InSaberAnim(), and WP_SABER.

Referenced by BG_SetAnimFinal(), and G_UpdateClientAnims().

02729 {
02730         if ( anim >= BOTH_A1_T__B_ && anim <= BOTH_ROLL_STAB )
02731         {
02732                 if ( weapon == WP_SABER )
02733                 {
02734                         saberInfo_t *saber = BG_MySaber( clientNum, 0 );
02735                         if ( saber 
02736                                 && saber->animSpeedScale != 1.0f )
02737                         {
02738                                 *animSpeed *= saber->animSpeedScale;
02739                         }
02740                         saber = BG_MySaber( clientNum, 1 );
02741                         if ( saber
02742                                 && saber->animSpeedScale != 1.0f )
02743                         {
02744                                 *animSpeed *= saber->animSpeedScale;
02745                         }
02746                 }
02747         }
02748 
02749         if ( ( (anim) >= BOTH_T1_BR__R && 
02750                 (anim) <= BOTH_T1_BL_TL ) ||
02751                 ( (anim) >= BOTH_T2_BR__R && 
02752                 (anim) <= BOTH_T2_BL_TL ) ||
02753                 ( (anim) >= BOTH_T3_BR__R && 
02754                 (anim) <= BOTH_T3_BL_TL ) )
02755         {
02756                 if ( saberAnimLevel == FORCE_LEVEL_1 )
02757                 {
02758                         *animSpeed *= 1.5f;
02759                 }
02760                 else if ( saberAnimLevel == FORCE_LEVEL_3 )
02761                 {
02762                         *animSpeed *= 0.75f;
02763                 }
02764 
02765                 if (broken & (1<<BROKENLIMB_RARM))
02766                 {
02767                         *animSpeed *= 0.5f;
02768                 }
02769                 else if (broken & (1<<BROKENLIMB_LARM))
02770                 {
02771                         *animSpeed *= 0.65f;
02772                 }
02773         }
02774         else if (broken && PM_InSaberAnim(anim))
02775         {
02776                 if (broken & (1<<BROKENLIMB_RARM))
02777                 {
02778                         *animSpeed *= 0.5f;
02779                 }
02780                 else if (broken & (1<<BROKENLIMB_LARM))
02781                 {
02782                         *animSpeed *= 0.65f;
02783                 }
02784         }
02785 }

void BG_SetAnim playerState_t ps,
animation_t animations,
int  setAnimParts,
int  anim,
int  setAnimFlags,
int  blendTime
 

Definition at line 2976 of file bg_panimate.c.

References animation_t, bgLoadedAnim_t::anims, BG_SetAnimFinal(), BG_SetLegsAnimTimer(), BG_SetTorsoAnimTimer(), bgAllAnims, BOTH_RUN1, BOTH_RUNBACK1, BOTH_WALK2, BOTH_WALKBACK1, animation_s::firstFrame, playerState_s::legsAnim, animation_s::numFrames, playerState_t, SETANIM_FLAG_OVERRIDE, SETANIM_FLAG_RESTART, SETANIM_LEGS, SETANIM_TORSO, and playerState_s::torsoAnim.

Referenced by AnimateRiders(), G_SetAnim(), Initialize(), PM_SetAnim(), and Vehicle_SetAnim().

02977 {
02978         if (!animations)
02979         {
02980                 animations = bgAllAnims[0].anims;
02981         }
02982 
02983         if (animations[anim].firstFrame == 0 && animations[anim].numFrames == 0)
02984         {
02985                 if (anim == BOTH_RUNBACK1 ||
02986                         anim == BOTH_WALKBACK1 ||
02987                         anim == BOTH_RUN1)
02988                 { //hack for droids
02989                         anim = BOTH_WALK2;
02990                 }
02991 
02992                 if (animations[anim].firstFrame == 0 && animations[anim].numFrames == 0)
02993                 { //still? Just return then I guess.
02994                         return;
02995                 }
02996         }
02997 
02998         /*
02999         if (BG_InSpecialJump(anim))
03000         {
03001                 setAnimFlags |= SETANIM_FLAG_RESTART;
03002         }
03003         */
03004         //Don't know why I put this here originally but it's messing stuff up now and it isn't needed.
03005 
03006 //      if (BG_InRoll(ps, ps->legsAnim))
03007 //      { //never interrupt a roll
03008 //              return;
03009 //      }
03010 
03011         if (setAnimFlags&SETANIM_FLAG_OVERRIDE)
03012         {
03013                 if (setAnimParts & SETANIM_TORSO)
03014                 {
03015                         if( (setAnimFlags & SETANIM_FLAG_RESTART) || (ps->torsoAnim) != anim )
03016                         {
03017                                 BG_SetTorsoAnimTimer(ps, 0);
03018                         }
03019                 }
03020                 if (setAnimParts & SETANIM_LEGS)
03021                 {
03022                         if( (setAnimFlags & SETANIM_FLAG_RESTART) || (ps->legsAnim) != anim )
03023                         {
03024                                 BG_SetLegsAnimTimer(ps, 0);
03025                         }
03026                 }
03027         }
03028 
03029         BG_SetAnimFinal(ps, animations, setAnimParts, anim, setAnimFlags, blendTime);
03030 }

void BG_SetAnimFinal playerState_t ps,
animation_t animations,
int  setAnimParts,
int  anim,
int  setAnimFlags,
int  blendTime
 

Definition at line 2795 of file bg_panimate.c.

References animation_t, BG_SaberStartTransAnim(), BG_StartTorsoAnim(), playerState_s::brokenLimbs, playerState_s::clientNum, fabs(), playerState_s::fd, forcedata_s::forcePowersActive, FP_RAGE, FP_SPEED, playerState_s::legsAnim, playerState_s::legsTimer, animation_s::numFrames, playerState_t, PM_RunningAnim(), PM_WalkingAnim(), forcedata_s::saberAnimLevel, SETANIM_FLAG_HOLD, SETANIM_FLAG_HOLDLESS, SETANIM_FLAG_OVERRIDE, SETANIM_FLAG_RESTART, SETANIM_LEGS, SETANIM_TORSO, playerState_s::torsoAnim, playerState_s::torsoTimer, and playerState_s::weapon.

Referenced by BG_SetAnim(), and PM_SetAnimFinal().

02798 {
02799         float editAnimSpeed = 1;
02800 
02801         if (!animations)
02802         {
02803                 return;
02804         }
02805 
02806         assert(anim > -1);
02807         assert(animations[anim].firstFrame > 0 || animations[anim].numFrames > 0);
02808 
02809         //NOTE: Setting blendTime here breaks actual blending..
02810         blendTime = 0;
02811 
02812         BG_SaberStartTransAnim(ps->clientNum, ps->fd.saberAnimLevel, ps->weapon, anim, &editAnimSpeed, ps->brokenLimbs);
02813 
02814         // Set torso anim
02815         if (setAnimParts & SETANIM_TORSO)
02816         {
02817                 // Don't reset if it's already running the anim
02818                 if( !(setAnimFlags & SETANIM_FLAG_RESTART) && (ps->torsoAnim) == anim )
02819                 {
02820                         goto setAnimLegs;
02821                 }
02822                 // or if a more important anim is running
02823                 if( !(setAnimFlags & SETANIM_FLAG_OVERRIDE) && ((ps->torsoTimer > 0)||(ps->torsoTimer == -1)) )
02824                 {       
02825                         goto setAnimLegs;
02826                 }
02827 
02828                 BG_StartTorsoAnim(ps, anim);
02829 
02830                 if (setAnimFlags & SETANIM_FLAG_HOLD)
02831                 {
02832                         if (setAnimFlags & SETANIM_FLAG_HOLDLESS)
02833                         {       // Make sure to only wait in full 1/20 sec server frame intervals.
02834                                 int dur;
02835                                 int speedDif;
02836                                 
02837                                 dur = (animations[anim].numFrames-1) * fabs((float)(animations[anim].frameLerp));
02838                                 speedDif = dur - (dur * editAnimSpeed);
02839                                 dur += speedDif;
02840                                 if (dur > 1)
02841                                 {
02842                                         ps->torsoTimer = dur-1;
02843                                 }
02844                                 else
02845                                 {
02846                                         ps->torsoTimer = fabs((float)(animations[anim].frameLerp));
02847                                 }
02848                         }
02849                         else
02850                         {
02851                                 ps->torsoTimer = ((animations[anim].numFrames ) * fabs((float)(animations[anim].frameLerp)));
02852                         }
02853 
02854                         if (ps->fd.forcePowersActive & (1 << FP_RAGE))
02855                         {
02856                                 ps->torsoTimer /= 1.7;
02857                         }
02858                 }
02859         }
02860 
02861 setAnimLegs:
02862         // Set legs anim
02863         if (setAnimParts & SETANIM_LEGS)
02864         {
02865                 // Don't reset if it's already running the anim
02866                 if( !(setAnimFlags & SETANIM_FLAG_RESTART) && (ps->legsAnim) == anim )
02867                 {
02868                         goto setAnimDone;
02869                 }
02870                 // or if a more important anim is running
02871                 if( !(setAnimFlags & SETANIM_FLAG_OVERRIDE) && ((ps->legsTimer > 0)||(ps->legsTimer == -1)) )
02872                 {       
02873                         goto setAnimDone;
02874                 }
02875 
02876                 BG_StartLegsAnim(ps, anim);
02877 
02878                 if (setAnimFlags & SETANIM_FLAG_HOLD)
02879                 {
02880                         if (setAnimFlags & SETANIM_FLAG_HOLDLESS)
02881                         {       // Make sure to only wait in full 1/20 sec server frame intervals.
02882                                 int dur;
02883                                 int speedDif;
02884                                 
02885                                 dur = (animations[anim].numFrames-1) * fabs((float)(animations[anim].frameLerp));
02886                                 speedDif = dur - (dur * editAnimSpeed);
02887                                 dur += speedDif;
02888                                 if (dur > 1)
02889                                 {
02890                                         ps->legsTimer = dur-1;
02891                                 }
02892                                 else
02893                                 {
02894                                         ps->legsTimer = fabs((float)(animations[anim].frameLerp));
02895                                 }
02896                         }
02897                         else
02898                         {
02899                                 ps->legsTimer = ((animations[anim].numFrames ) * fabs((float)(animations[anim].frameLerp)));
02900                         }
02901 
02902                         if (PM_RunningAnim(anim) ||
02903                                 PM_WalkingAnim(anim)) //these guys are ok, they don't actually reference pm
02904                         {
02905                                 if (ps->fd.forcePowersActive & (1 << FP_RAGE))
02906                                 {
02907                                         ps->legsTimer /= 1.3;
02908                                 }
02909                                 else if (ps->fd.forcePowersActive & (1 << FP_SPEED))
02910                                 {
02911                                         ps->legsTimer /= 1.7;
02912                                 }
02913                         }
02914                 }
02915         }
02916 
02917 setAnimDone:
02918         return;
02919 }

void BG_SetLegsAnimTimer playerState_t ps,
int  time
 

Definition at line 2693 of file bg_panimate.c.

References playerState_s::legsTimer, and playerState_t.

Referenced by BG_SetAnim(), Eject(), and PM_SetLegsAnimTimer().

02694 {
02695         ps->legsTimer = time;
02696 
02697         if (ps->legsTimer < 0 && time != -1 )
02698         {//Cap timer to 0 if was counting down, but let it be -1 if that was intentional.  NOTENOTE Yeah this seems dumb, but it mirrors SP.
02699                 ps->legsTimer = 0;
02700         }
02701 }

void BG_SetTorsoAnimTimer playerState_t ps,
int  time
 

Definition at line 2713 of file bg_panimate.c.

References playerState_t, and playerState_s::torsoTimer.

Referenced by BG_SetAnim(), Eject(), and PM_SetTorsoAnimTimer().

02714 {
02715         ps->torsoTimer = time;
02716 
02717         if (ps->torsoTimer < 0 && time != -1 )
02718         {//Cap timer to 0 if was counting down, but let it be -1 if that was intentional.  NOTENOTE Yeah this seems dumb, but it mirrors SP.
02719                 ps->torsoTimer = 0;
02720         }
02721 }

qboolean BG_SpinningSaberAnim int  anim  ) 
 

Definition at line 479 of file bg_panimate.c.

References BOTH_ATTACK_BACK, BOTH_BUTTERFLY_LEFT, BOTH_BUTTERFLY_RIGHT, BOTH_CROUCHATTACKBACK1, BOTH_FJSS_TL_BR, BOTH_FJSS_TR_BL, BOTH_JUMPFLIPSLASHDOWN1, BOTH_JUMPFLIPSTABDOWN, BOTH_T1__L__R, BOTH_T1__L_BR, BOTH_T1__R__L, BOTH_T1__R_BL, BOTH_T1_BL__R, BOTH_T1_BL_BR, BOTH_T1_BL_TR, BOTH_T1_BR__L, BOTH_T1_BR_BL, BOTH_T1_BR_TL, BOTH_T1_TL_BR, BOTH_T1_TR_BL, BOTH_T2__L_BR, BOTH_T2__R_BL, BOTH_T2_BL__R, BOTH_T2_BL_BR, BOTH_T2_BR__L, BOTH_T2_BR_BL, BOTH_T3__L_BR, BOTH_T3__R_BL, BOTH_T3_BL__R, BOTH_T3_BL_BR, BOTH_T3_BR__L, BOTH_T3_BR_BL, BOTH_T4__L_BR, BOTH_T4__R_BL, BOTH_T4_BL__R, BOTH_T4_BL_BR, BOTH_T4_BR__L, BOTH_T4_BR_BL, BOTH_T5__L__R, BOTH_T5__L_BR, BOTH_T5__R__L, BOTH_T5__R_BL, BOTH_T5_BL__R, BOTH_T5_BL_BR, BOTH_T5_BL_TR, BOTH_T5_BR__L, BOTH_T5_BR_BL, BOTH_T5_BR_TL, BOTH_T5_TL_BR, BOTH_T5_TR_BL, BOTH_T6__L__R, BOTH_T6__L_BR, BOTH_T6__L_T_, BOTH_T6__L_TR, BOTH_T6__R__L, BOTH_T6__R_BL, BOTH_T6__R_TL, BOTH_T6_BL__R, BOTH_T6_BL_BR, BOTH_T6_BL_T_, BOTH_T6_BL_TR, BOTH_T6_BR__L, BOTH_T6_BR_BL, BOTH_T6_BR_TL, BOTH_T6_T__BL, BOTH_T6_T__TL, BOTH_T6_TL__R, BOTH_T6_TL_BR, BOTH_T6_TL_TR, BOTH_T6_TR__L, BOTH_T6_TR_BL, BOTH_T6_TR_TL, BOTH_T7__L__R, BOTH_T7__L_BR, BOTH_T7__L_TR, BOTH_T7__R__L, BOTH_T7__R_BL, BOTH_T7_BL__R, BOTH_T7_BL_BR, BOTH_T7_BL_TR, BOTH_T7_BR__L, BOTH_T7_BR_BL, BOTH_T7_BR_TL, BOTH_T7_T___R, BOTH_T7_T__BR, BOTH_T7_TL_BR, BOTH_T7_TL_TR, BOTH_T7_TR__L, BOTH_V7_BL_S7, qboolean, qfalse, and qtrue.

Referenced by BG_AdjustClientSpeed(), G_SPSaberDamageTraceLerped(), Jedi_SaberBlockGo(), Jedi_SaberBusy(), PM_SetSaberMove(), PM_SpinningAnim(), PmoveSingle(), and WP_ResistForcePush().

00480 {
00481         switch ( anim )
00482         {
00483         //level 1 - FIXME: level 1 will have *no* spins
00484         case BOTH_T1_BR_BL:
00485         case BOTH_T1__R__L:
00486         case BOTH_T1__R_BL:
00487         case BOTH_T1_TR_BL:
00488         case BOTH_T1_BR_TL:
00489         case BOTH_T1_BR__L:
00490         case BOTH_T1_TL_BR:
00491         case BOTH_T1__L_BR:
00492         case BOTH_T1__L__R:
00493         case BOTH_T1_BL_BR:
00494         case BOTH_T1_BL__R:
00495         case BOTH_T1_BL_TR:
00496         //level 2
00497         case BOTH_T2_BR__L:
00498         case BOTH_T2_BR_BL:
00499         case BOTH_T2__R_BL:
00500         case BOTH_T2__L_BR:
00501         case BOTH_T2_BL_BR:
00502         case BOTH_T2_BL__R:
00503         //level 3
00504         case BOTH_T3_BR__L:
00505         case BOTH_T3_BR_BL:
00506         case BOTH_T3__R_BL:
00507         case BOTH_T3__L_BR:
00508         case BOTH_T3_BL_BR:
00509         case BOTH_T3_BL__R:
00510         //level 4
00511         case BOTH_T4_BR__L:
00512         case BOTH_T4_BR_BL:
00513         case BOTH_T4__R_BL:
00514         case BOTH_T4__L_BR:
00515         case BOTH_T4_BL_BR:
00516         case BOTH_T4_BL__R:
00517         //level 5
00518         case BOTH_T5_BR_BL:
00519         case BOTH_T5__R__L:
00520         case BOTH_T5__R_BL:
00521         case BOTH_T5_TR_BL:
00522         case BOTH_T5_BR_TL:
00523         case BOTH_T5_BR__L:
00524         case BOTH_T5_TL_BR:
00525         case BOTH_T5__L_BR:
00526         case BOTH_T5__L__R:
00527         case BOTH_T5_BL_BR:
00528         case BOTH_T5_BL__R:
00529         case BOTH_T5_BL_TR:
00530         //level 6
00531         case BOTH_T6_BR_TL:
00532         case BOTH_T6__R_TL:
00533         case BOTH_T6__R__L:
00534         case BOTH_T6__R_BL:
00535         case BOTH_T6_TR_TL:
00536         case BOTH_T6_TR__L:
00537         case BOTH_T6_TR_BL:
00538         case BOTH_T6_T__TL:
00539         case BOTH_T6_T__BL:
00540         case BOTH_T6_TL_BR:
00541         case BOTH_T6__L_BR:
00542         case BOTH_T6__L__R:
00543         case BOTH_T6_TL__R:
00544         case BOTH_T6_TL_TR:
00545         case BOTH_T6__L_TR:
00546         case BOTH_T6__L_T_:
00547         case BOTH_T6_BL_T_:
00548         case BOTH_T6_BR__L:
00549         case BOTH_T6_BR_BL:
00550         case BOTH_T6_BL_BR:
00551         case BOTH_T6_BL__R:
00552         case BOTH_T6_BL_TR:
00553         //level 7
00554         case BOTH_T7_BR_TL:
00555         case BOTH_T7_BR__L:
00556         case BOTH_T7_BR_BL:
00557         case BOTH_T7__R__L:
00558         case BOTH_T7__R_BL:
00559         case BOTH_T7_TR__L:
00560         case BOTH_T7_T___R:
00561         case BOTH_T7_TL_BR:
00562         case BOTH_T7__L_BR:
00563         case BOTH_T7__L__R:
00564         case BOTH_T7_BL_BR:
00565         case BOTH_T7_BL__R:
00566         case BOTH_T7_BL_TR:
00567         case BOTH_T7_TL_TR:
00568         case BOTH_T7_T__BR:
00569         case BOTH_T7__L_TR:
00570         case BOTH_V7_BL_S7:
00571         //special
00572         //case BOTH_A2_STABBACK1:
00573         case BOTH_ATTACK_BACK:
00574         case BOTH_CROUCHATTACKBACK1:
00575         case BOTH_BUTTERFLY_LEFT:
00576         case BOTH_BUTTERFLY_RIGHT:
00577         case BOTH_FJSS_TR_BL:
00578         case BOTH_FJSS_TL_BR:
00579         case BOTH_JUMPFLIPSLASHDOWN1:
00580         case BOTH_JUMPFLIPSTABDOWN:
00581                 return qtrue;
00582                 break;
00583         }
00584         return qfalse;
00585 }

qboolean BG_StabDownAnim int  anim  ) 
 

Definition at line 1074 of file bg_panimate.c.

References BOTH_STABDOWN, BOTH_STABDOWN_DUAL, BOTH_STABDOWN_STAFF, qboolean, qfalse, and qtrue.

01075 {
01076         switch ( anim )
01077         {
01078         case BOTH_STABDOWN:
01079         case BOTH_STABDOWN_STAFF:
01080         case BOTH_STABDOWN_DUAL:
01081                 return qtrue;
01082         }
01083         return qfalse;
01084 }

void BG_StartTorsoAnim playerState_t ps,
int  anim
 

Definition at line 2659 of file bg_panimate.c.

References BG_FlipPart(), BG_InDeathAnim(), playerState_s::clientNum, g_entities, playerState_t, PM_DEAD, playerState_s::pm_type, SETANIM_TORSO, and playerState_s::torsoAnim.

Referenced by BG_SetAnimFinal(), and PM_StartTorsoAnim().

02660 {
02661         if ( ps->pm_type >= PM_DEAD )
02662         {
02663                 assert(!BG_InDeathAnim(anim));
02664                 //please let me know if this assert fires on you (ideally before you close/ignore it) -rww
02665                 return;
02666         }
02667 
02668         if (ps->torsoAnim == anim)
02669         {
02670                 BG_FlipPart(ps, SETANIM_TORSO);
02671         }
02672 #ifdef QAGAME
02673         else if (g_entities[ps->clientNum].s.torsoAnim == anim)
02674         { //toggled anim to one anim then back to the one we were at previously in
02675                 //one frame, indicating that anim should be restarted.
02676                 BG_FlipPart(ps, SETANIM_TORSO);
02677         }
02678 #endif
02679         ps->torsoAnim = anim;
02680 }

qboolean BG_SuperBreakLoseAnim int  anim  ) 
 

Definition at line 1430 of file bg_panimate.c.

References BOTH_LK_DL_DL_S_SB_1_L, BOTH_LK_DL_DL_T_SB_1_L, BOTH_LK_DL_S_S_SB_1_L, BOTH_LK_DL_S_T_SB_1_L, BOTH_LK_DL_ST_S_SB_1_L, BOTH_LK_DL_ST_T_SB_1_L, BOTH_LK_S_DL_S_SB_1_L, BOTH_LK_S_DL_T_SB_1_L, BOTH_LK_S_S_S_SB_1_L, BOTH_LK_S_S_T_SB_1_L, BOTH_LK_S_ST_S_SB_1_L, BOTH_LK_S_ST_T_SB_1_L, BOTH_LK_ST_DL_S_SB_1_L, BOTH_LK_ST_DL_T_SB_1_L, BOTH_LK_ST_S_S_SB_1_L, BOTH_LK_ST_S_T_SB_1_L, BOTH_LK_ST_ST_S_SB_1_L, BOTH_LK_ST_ST_T_SB_1_L, qboolean, qfalse, and qtrue.

Referenced by BG_SaberLockBreakAnim(), and PM_WeaponLightsaber().

01431 {
01432         switch ( anim )
01433         {
01434         case BOTH_LK_S_DL_S_SB_1_L:     //super break I lost
01435         case BOTH_LK_S_DL_T_SB_1_L:     //super break I lost
01436         case BOTH_LK_S_ST_S_SB_1_L:     //super break I lost
01437         case BOTH_LK_S_ST_T_SB_1_L:     //super break I lost
01438         case BOTH_LK_S_S_S_SB_1_L:      //super break I lost
01439         case BOTH_LK_S_S_T_SB_1_L:      //super break I lost
01440         case BOTH_LK_DL_DL_S_SB_1_L:    //super break I lost
01441         case BOTH_LK_DL_DL_T_SB_1_L:    //super break I lost
01442         case BOTH_LK_DL_ST_S_SB_1_L:    //super break I lost
01443         case BOTH_LK_DL_ST_T_SB_1_L:    //super break I lost
01444         case BOTH_LK_DL_S_S_SB_1_L:     //super break I lost
01445         case BOTH_LK_DL_S_T_SB_1_L:     //super break I lost
01446         case BOTH_LK_ST_DL_S_SB_1_L:    //super break I lost
01447         case BOTH_LK_ST_DL_T_SB_1_L:    //super break I lost
01448         case BOTH_LK_ST_ST_S_SB_1_L:    //super break I lost
01449         case BOTH_LK_ST_ST_T_SB_1_L:    //super break I lost
01450         case BOTH_LK_ST_S_S_SB_1_L:     //super break I lost
01451         case BOTH_LK_ST_S_T_SB_1_L:     //super break I lost
01452                 return qtrue;
01453                 break;
01454         }
01455         return qfalse;
01456 }

qboolean BG_SuperBreakWinAnim int  anim  ) 
 

Definition at line 1458 of file bg_panimate.c.

References BOTH_LK_DL_DL_S_SB_1_W, BOTH_LK_DL_DL_T_SB_1_W, BOTH_LK_DL_S_S_SB_1_W, BOTH_LK_DL_S_T_SB_1_W, BOTH_LK_DL_ST_S_SB_1_W, BOTH_LK_DL_ST_T_SB_1_W, BOTH_LK_S_DL_S_SB_1_W, BOTH_LK_S_DL_T_SB_1_W, BOTH_LK_S_S_S_SB_1_W, BOTH_LK_S_S_T_SB_1_W, BOTH_LK_S_ST_S_SB_1_W, BOTH_LK_S_ST_T_SB_1_W, BOTH_LK_ST_DL_S_SB_1_W, BOTH_LK_ST_DL_T_SB_1_W, BOTH_LK_ST_S_S_SB_1_W, BOTH_LK_ST_S_T_SB_1_W, BOTH_LK_ST_ST_S_SB_1_W, BOTH_LK_ST_ST_T_SB_1_W, qboolean, qfalse, and qtrue.

Referenced by BG_SaberLockBreakAnim(), CG_AddSaberBlade(), PM_WeaponLightsaber(), and WP_SaberPositionUpdate().

01459 {
01460         switch ( anim )
01461         {
01462         case BOTH_LK_S_DL_S_SB_1_W:     //super break I won
01463         case BOTH_LK_S_DL_T_SB_1_W:     //super break I won
01464         case BOTH_LK_S_ST_S_SB_1_W:     //super break I won
01465         case BOTH_LK_S_ST_T_SB_1_W:     //super break I won
01466         case BOTH_LK_S_S_S_SB_1_W:      //super break I won
01467         case BOTH_LK_S_S_T_SB_1_W:      //super break I won
01468         case BOTH_LK_DL_DL_S_SB_1_W:    //super break I won
01469         case BOTH_LK_DL_DL_T_SB_1_W:    //super break I won
01470         case BOTH_LK_DL_ST_S_SB_1_W:    //super break I won
01471         case BOTH_LK_DL_ST_T_SB_1_W:    //super break I won
01472         case BOTH_LK_DL_S_S_SB_1_W:     //super break I won
01473         case BOTH_LK_DL_S_T_SB_1_W:     //super break I won
01474         case BOTH_LK_ST_DL_S_SB_1_W:    //super break I won
01475         case BOTH_LK_ST_DL_T_SB_1_W:    //super break I won
01476         case BOTH_LK_ST_ST_S_SB_1_W:    //super break I won
01477         case BOTH_LK_ST_ST_T_SB_1_W:    //super break I won
01478         case BOTH_LK_ST_S_S_SB_1_W:     //super break I won
01479         case BOTH_LK_ST_S_T_SB_1_W:     //super break I won
01480                 return qtrue;
01481                 break;
01482         }
01483         return qfalse;
01484 }

int CheckAnimFrameForEventType animevent_t animEvents,
int  keyFrame,
animEventType_t  eventType
 

Definition at line 1782 of file bg_panimate.c.

References animevent_t, animevent_s::eventType, animevent_s::keyFrame, and MAX_ANIM_EVENTS.

Referenced by ParseAnimationEvtBlock().

01783 {
01784         int i;
01785 
01786         for ( i = 0; i < MAX_ANIM_EVENTS; i++ )
01787         {
01788                 if ( animEvents[i].keyFrame == keyFrame )
01789                 {//there is an animevent on this frame already
01790                         if ( animEvents[i].eventType == eventType )
01791                         {//and it is of the same type
01792                                 return i;
01793                         }
01794                 }
01795         }
01796         //nope
01797         return -1;
01798 }

void ParseAnimationEvtBlock const char *  aeb_filename,
animevent_t animEvents,
animation_t animations,
int *  i,
const char **  text_p
 

Definition at line 1800 of file bg_panimate.c.

References AED_EFFECT_PROBABILITY, AED_EFFECTINDEX, AED_FIRE_ALT, AED_FIRE_PROBABILITY, AED_FOOTSTEP_PROBABILITY, AED_FOOTSTEP_TYPE, AED_MOVE_FWD, AED_MOVE_RT, AED_MOVE_UP, AED_SABER_SPIN_PROBABILITY, AED_SABER_SPIN_SABERNUM, AED_SABER_SPIN_TYPE, AED_SABER_SWING_PROBABILITY, AED_SABER_SWING_SABERNUM, AED_SABER_SWING_TYPE, AED_SOUND_NUMRANDOMSNDS, AED_SOUND_PROBABILITY, AED_SOUNDCHANNEL, AED_SOUNDINDEX_END, AED_SOUNDINDEX_START, AEV_EFFECT, AEV_FIRE, AEV_FOOTSTEP, AEV_MOVE, AEV_NONE, AEV_SABER_SPIN, AEV_SABER_SWING, AEV_SOUND, AEV_SOUNDCHAN, animation_t, animevent_t, animEventType_t, animEventTypeTable, animTable, atoi(), BG_Alloc(), CHAN_ANNOUNCER, CHAN_AUTO, CHAN_BODY, CHAN_VOICE, CHAN_VOICE_ATTEN, CHAN_VOICE_GLOBAL, CHAN_WEAPON, CheckAnimFrameForEventType(), Com_Error(), COM_Parse(), COM_ParseExt(), Com_Printf(), ERR_DROP, animevent_s::eventData, animevent_s::eventType, animation_s::firstFrame, footstepTypeTable, GetIDForString(), animevent_s::keyFrame, MAX_ANIM_EVENTS, MAX_QPATH, MAX_RANDOM_ANIM_SOUNDS, animation_s::numFrames, Q_stricmp(), Q_stricmpn(), qfalse, S_COLOR_RED, S_COLOR_YELLOW, SkipRestOfLine(), strcpy(), animevent_s::stringData, trap_FX_RegisterEffect(), trap_S_RegisterSound(), and va().

Referenced by BG_ParseAnimationEvtFile().

01801 {
01802         const char              *token;
01803         int                             num, n, animNum, keyFrame, lowestVal, highestVal, curAnimEvent, lastAnimEvent = 0;
01804         animEventType_t eventType;
01805         char                    stringData[MAX_QPATH];
01806 
01807         // get past starting bracket
01808         while(1) 
01809         {
01810                 token = COM_Parse( text_p );
01811                 if ( !Q_stricmp( token, "{" ) ) 
01812                 {
01813                         break;
01814                 }
01815         }
01816 
01817         //NOTE: instead of a blind increment, increase the index
01818         //                      this way if we have an event on an anim that already
01819         //                      has an event of that type, it stomps it
01820 
01821         // read information for each frame
01822         while ( 1 ) 
01823         {
01824                 if ( lastAnimEvent >= MAX_ANIM_EVENTS )
01825                 {
01826                         Com_Error( ERR_DROP, "ParseAnimationEvtBlock: number events in animEvent file %s > MAX_ANIM_EVENTS(%i)", aeb_filename, MAX_ANIM_EVENTS );
01827                         return;
01828                 }
01829                 // Get base frame of sequence
01830                 token = COM_Parse( text_p );
01831                 if ( !token || !token[0]) 
01832                 {
01833                         break;
01834                 }
01835 
01836                 if ( !Q_stricmp( token, "}" ) )         // At end of block 
01837                 {
01838                         break;
01839                 }
01840 
01841                 //Compare to same table as animations used 
01842                 //      so we don't have to use actual numbers for animation first frames,
01843                 //      just need offsets.
01844                 //This way when animation numbers change, this table won't have to be updated,
01845                 //      at least not much.
01846                 animNum = GetIDForString(animTable, token);
01847                 if(animNum == -1)
01848                 {//Unrecognized ANIM ENUM name, or we're skipping this line, keep going till you get a good one
01849                         Com_Printf(S_COLOR_YELLOW"WARNING: Unknown token %s in animEvent file %s\n", token, aeb_filename );
01850                         while (token[0])
01851                         {
01852                                 token = COM_ParseExt( text_p, qfalse ); //returns empty string when next token is EOL
01853                         }
01854                         continue;
01855                 }
01856 
01857                 if ( animations[animNum].numFrames == 0 )
01858                 {//we don't use this anim
01859                         Com_Printf(S_COLOR_YELLOW"WARNING: %s animevents.cfg: anim %s not used by this model\n", aeb_filename, token);
01860                         //skip this entry
01861                         SkipRestOfLine( text_p );
01862                         continue;
01863                 }
01864 
01865                 token = COM_Parse( text_p );
01866                 eventType = (animEventType_t)GetIDForString(animEventTypeTable, token);
01867                 if ( eventType == AEV_NONE || eventType == -1 )
01868                 {//Unrecognized ANIM EVENT TYOE, or we're skipping this line, keep going till you get a good one
01869                         //Com_Printf(S_COLOR_YELLOW"WARNING: Unknown token %s in animEvent file %s\n", token, aeb_filename );
01870                         continue;
01871                 }
01872 
01873                 //set our start frame
01874                 keyFrame = animations[animNum].firstFrame;
01875                 // Get offset to frame within sequence
01876                 token = COM_Parse( text_p );
01877                 if ( !token ) 
01878                 {
01879                         break;
01880                 }
01881                 keyFrame += atoi( token );
01882 
01883                 //see if this frame already has an event of this type on it, if so, overwrite it
01884                 curAnimEvent = CheckAnimFrameForEventType( animEvents, keyFrame, eventType );
01885                 if ( curAnimEvent == -1 )
01886                 {//this anim frame doesn't already have an event of this type on it
01887                         curAnimEvent = lastAnimEvent;
01888                 }
01889 
01890                 //now that we know which event index we're going to plug the data into, start doing it
01891                 animEvents[curAnimEvent].eventType = eventType;
01892                 animEvents[curAnimEvent].keyFrame = keyFrame;
01893 
01894                 //now read out the proper data based on the type
01895                 switch ( animEvents[curAnimEvent].eventType )
01896                 {
01897                 case AEV_SOUNDCHAN:             //# animID AEV_SOUNDCHAN framenum CHANNEL soundpath randomlow randomhi chancetoplay
01898                         token = COM_Parse( text_p );
01899                         if ( !token ) 
01900                         {
01901                                 break;
01902                         }
01903                         if ( stricmp( token, "CHAN_VOICE_ATTEN" ) == 0 )
01904                         {
01905                                 animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_VOICE_ATTEN;
01906                         }
01907                         else if ( stricmp( token, "CHAN_VOICE_GLOBAL" ) == 0 )
01908                         {
01909                                 animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_VOICE_GLOBAL;
01910                         }
01911                         else if ( stricmp( token, "CHAN_ANNOUNCER" ) == 0 )
01912                         {
01913                                 animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_ANNOUNCER;
01914                         }
01915                         else if ( stricmp( token, "CHAN_BODY" ) == 0 )
01916                         {
01917                                 animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_BODY;
01918                         }
01919                         else if ( stricmp( token, "CHAN_WEAPON" ) == 0 )
01920                         {
01921                                 animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_WEAPON;
01922                         }
01923                         else if ( stricmp( token, "CHAN_VOICE" ) == 0 )
01924                         {
01925                                 animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_VOICE;
01926                         } 
01927                         else
01928                         {
01929                                 animEvents[curAnimEvent].eventData[AED_SOUNDCHANNEL] = CHAN_AUTO;
01930                         }
01931                         //fall through to normal sound
01932                 case AEV_SOUND:                 //# animID AEV_SOUND framenum soundpath randomlow randomhi chancetoplay
01933                         //get soundstring
01934                         token = COM_Parse( text_p );
01935                         if ( !token ) 
01936                         {
01937                                 break;
01938                         }               
01939                         strcpy(stringData, token);
01940                         //get lowest value
01941                         token = COM_Parse( text_p );
01942                         if ( !token ) 
01943                         {//WARNING!  BAD TABLE!
01944                                 break;
01945                         }
01946                         lowestVal = atoi( token );
01947                         //get highest value
01948                         token = COM_Parse( text_p );
01949                         if ( !token ) 
01950                         {//WARNING!  BAD TABLE!
01951                                 break;
01952                         }
01953                         highestVal = atoi( token );
01954                         //Now precache all the sounds
01955                         //NOTE: If we can be assured sequential handles, we can store sound indices
01956                         //              instead of strings, unfortunately, if these sounds were previously
01957                         //              registered, we cannot be guaranteed sequential indices.  Thus an array
01958                         if(lowestVal && highestVal)
01959                         {
01960                                 //assert(highestVal - lowestVal < MAX_RANDOM_ANIM_SOUNDS);
01961                                 if ((highestVal-lowestVal) >= MAX_RANDOM_ANIM_SOUNDS)
01962                                 {
01963                                         highestVal = lowestVal + (MAX_RANDOM_ANIM_SOUNDS-1);
01964                                 }
01965                                 for ( n = lowestVal, num = AED_SOUNDINDEX_START; n <= highestVal && num <= AED_SOUNDINDEX_END; n++, num++ )
01966                                 {
01967                                         if (stringData[0] == '*')
01968                                         { //FIXME? Would be nice to make custom sounds work with animEvents.
01969                                                 animEvents[curAnimEvent].eventData[num] = 0;
01970                                         }
01971                                         else
01972                                         {
01973                                                 animEvents[curAnimEvent].eventData[num] = trap_S_RegisterSound( va( stringData, n ) );
01974                                         }
01975                                 }
01976                                 animEvents[curAnimEvent].eventData[AED_SOUND_NUMRANDOMSNDS] = num - 1;
01977                         }
01978                         else
01979                         {
01980                                 if (stringData[0] == '*')
01981                                 { //FIXME? Would be nice to make custom sounds work with animEvents.
01982                                         animEvents[curAnimEvent].eventData[AED_SOUNDINDEX_START] = 0;
01983                                 }
01984                                 else
01985                                 {
01986                                         animEvents[curAnimEvent].eventData[AED_SOUNDINDEX_START] = trap_S_RegisterSound( stringData );
01987                                 }
01988 #ifndef FINAL_BUILD
01989                                 if ( !animEvents[curAnimEvent].eventData[AED_SOUNDINDEX_START] &&
01990                                          stringData[0] != '*')
01991                                 {//couldn't register it - file not found
01992                                         Com_Printf( S_COLOR_RED "ParseAnimationSndBlock: sound %s does not exist (animevents.cfg %s)!\n", stringData, aeb_filename );
01993                                 }
01994 #endif
01995                                 animEvents[curAnimEvent].eventData[AED_SOUND_NUMRANDOMSNDS] = 0;
01996                         }
01997                         //get probability
01998                         token = COM_Parse( text_p );
01999                         if ( !token ) 
02000                         {//WARNING!  BAD TABLE!
02001                                 break;
02002                         }
02003                         animEvents[curAnimEvent].eventData[AED_SOUND_PROBABILITY] = atoi( token );
02004 
02005                         //last part - cheat and check and see if it's a special overridable saber sound we know of...
02006                         if ( !Q_stricmpn( "sound/weapons/saber/saberhup", stringData, 28 ) )
02007                         {//a saber swing
02008                                 animEvents[curAnimEvent].eventType = AEV_SABER_SWING;
02009                                 animEvents[curAnimEvent].eventData[AED_SABER_SWING_SABERNUM] = 0;//since we don't know which one they meant if we're hacking this, always use first saber
02010                                 animEvents[curAnimEvent].eventData[AED_SABER_SWING_PROBABILITY] = animEvents[curAnimEvent].eventData[AED_SOUND_PROBABILITY];
02011                                 if ( lowestVal < 4 )
02012                                 {//fast swing
02013                                         animEvents[curAnimEvent].eventData[AED_SABER_SWING_TYPE] = 0;//SWING_FAST;
02014                                 }
02015                                 else if ( lowestVal < 7 )
02016                                 {//medium swing
02017                                         animEvents[curAnimEvent].eventData[AED_SABER_SWING_TYPE] = 1;//SWING_MEDIUM;
02018                                 }
02019                                 else
02020                                 {//strong swing
02021                                         animEvents[curAnimEvent].eventData[AED_SABER_SWING_TYPE] = 2;//SWING_STRONG;
02022                                 }
02023                         }
02024                         else if ( !Q_stricmpn( "sound/weapons/saber/saberspin", stringData, 29 ) )
02025                         {//a saber spin
02026                                 animEvents[curAnimEvent].eventType = AEV_SABER_SPIN;
02027                                 animEvents[curAnimEvent].eventData[AED_SABER_SPIN_SABERNUM] = 0;//since we don't know which one they meant if we're hacking this, always use first saber
02028                                 animEvents[curAnimEvent].eventData[AED_SABER_SPIN_PROBABILITY] = animEvents[curAnimEvent].eventData[AED_SOUND_PROBABILITY];
02029                                 if ( stringData[29] == 'o' )
02030                                 {//saberspinoff
02031                                         animEvents[curAnimEvent].eventData[AED_SABER_SPIN_TYPE] = 0;
02032                                 }
02033                                 else if ( stringData[29] == '1' )
02034                                 {//saberspin1
02035                                         animEvents[curAnimEvent].eventData[AED_SABER_SPIN_TYPE] = 2;
02036                                 }
02037                                 else if ( stringData[29] == '2' )
02038                                 {//saberspin2
02039                                         animEvents[curAnimEvent].eventData[AED_SABER_SPIN_TYPE] = 3;
02040                                 }
02041                                 else if ( stringData[29] == '3' )
02042                                 {//saberspin3
02043                                         animEvents[curAnimEvent].eventData[AED_SABER_SPIN_TYPE] = 4;
02044                                 }
02045                                 else if ( stringData[29] == '%' )
02046                                 {//saberspin%d
02047                                         animEvents[curAnimEvent].eventData[AED_SABER_SPIN_TYPE] = 5;
02048                                 }
02049                                 else
02050                                 {//just plain saberspin
02051                                         animEvents[curAnimEvent].eventData[AED_SABER_SPIN_TYPE] = 1;
02052                                 }
02053                         }
02054                         break;
02055                 case AEV_FOOTSTEP:              //# animID AEV_FOOTSTEP framenum footstepType
02056                         //get footstep type
02057                         token = COM_Parse( text_p );
02058                         if ( !token ) 
02059                         {
02060                                 break;
02061                         }               
02062                         animEvents[curAnimEvent].eventData[AED_FOOTSTEP_TYPE] = GetIDForString(footstepTypeTable, token);
02063                         //get probability
02064                         token = COM_Parse( text_p );
02065                         if ( !token ) 
02066                         {//WARNING!  BAD TABLE!
02067                                 break;
02068                         }
02069                         animEvents[curAnimEvent].eventData[AED_FOOTSTEP_PROBABILITY] = atoi( token );
02070                         break;
02071                 case AEV_EFFECT:                //# animID AEV_EFFECT framenum effectpath boltName
02072                         //get effect index
02073                         token = COM_Parse( text_p );
02074                         if ( !token ) 
02075                         {
02076                                 break;
02077                         }
02078                         animEvents[curAnimEvent].eventData[AED_EFFECTINDEX] = trap_FX_RegisterEffect( token );
02079                         //get bolt index
02080                         token = COM_Parse( text_p );
02081                         if ( !token ) 
02082                         {
02083                                 break;
02084                         }               
02085                         if ( Q_stricmp( "none", token ) != 0 && Q_stricmp( "NULL", token ) != 0 )
02086                         {//actually are specifying a bolt to use
02087                                 if (!animEvents[curAnimEvent].stringData)
02088                                 { //eh, whatever. no dynamic stuff, so this will do.
02089                                         animEvents[curAnimEvent].stringData = (char *) BG_Alloc(2048);
02090                                 }
02091                                 strcpy(animEvents[curAnimEvent].stringData, token);
02092                         }
02093                         //NOTE: this string will later be used to add a bolt and store the index, as below:
02094                         //animEvent->eventData[AED_BOLTINDEX] = gi.G2API_AddBolt( &cent->gent->ghoul2[cent->gent->playerModel], animEvent->stringData );
02095                         //get probability
02096                         token = COM_Parse( text_p );
02097                         if ( !token ) 
02098                         {//WARNING!  BAD TABLE!
02099                                 break;
02100                         }
02101                         animEvents[curAnimEvent].eventData[AED_EFFECT_PROBABILITY] = atoi( token );
02102                         break;
02103                 case AEV_FIRE:                  //# animID AEV_FIRE framenum altfire chancetofire
02104                         //get altfire
02105                         token = COM_Parse( text_p );
02106                         if ( !token ) 
02107                         {//WARNING!  BAD TABLE!
02108                                 break;
02109                         }
02110                         animEvents[curAnimEvent].eventData[AED_FIRE_ALT] = atoi( token );
02111                         //get probability
02112                         token = COM_Parse( text_p );
02113                         if ( !token ) 
02114                         {//WARNING!  BAD TABLE!
02115                                 break;
02116                         }
02117                         animEvents[curAnimEvent].eventData[AED_FIRE_PROBABILITY] = atoi( token );
02118                         break;
02119                 case AEV_MOVE:                  //# animID AEV_MOVE framenum forwardpush rightpush uppush
02120                         //get forward push
02121                         token = COM_Parse( text_p );
02122                         if ( !token ) 
02123                         {//WARNING!  BAD TABLE!
02124                                 break;
02125                         }
02126                         animEvents[curAnimEvent].eventData[AED_MOVE_FWD] = atoi( token );
02127                         //get right push
02128                         token = COM_Parse( text_p );
02129                         if ( !token ) 
02130                         {//WARNING!  BAD TABLE!
02131                                 break;
02132                         }
02133                         animEvents[curAnimEvent].eventData[AED_MOVE_RT] = atoi( token );
02134                         //get upwards push
02135                         token = COM_Parse( text_p );
02136                         if ( !token ) 
02137                         {//WARNING!  BAD TABLE!
02138                                 break;
02139                         }
02140                         animEvents[curAnimEvent].eventData[AED_MOVE_UP] = atoi( token );
02141                         break;
02142                 default:                                //unknown?
02143                         SkipRestOfLine( text_p );
02144                         continue;
02145                         break;
02146                 }
02147 
02148                 if ( curAnimEvent == lastAnimEvent )
02149                 {
02150                         lastAnimEvent++;
02151                 }
02152         }       
02153 }

int PM_AnimLength int  index,
animNumber_t  anim
 

Definition at line 1584 of file bg_panimate.c.

References pmove_t::animations, Com_Error(), ERR_DROP, fabs(), animation_s::frameLerp, MAX_ANIMATIONS, animation_s::numFrames, and pm.

Referenced by AnimateRiders(), BG_CmdForRoll(), and PM_CheckDualForwardJumpDuck().

01585 {
01586         if (anim >= MAX_ANIMATIONS || !pm->animations)
01587         {
01588                 return -1;
01589         }
01590         if ( anim < 0 )
01591         {
01592                 Com_Error(ERR_DROP,"ERROR: anim %d < 0\n", anim );
01593         }
01594         return pm->animations[anim].numFrames * fabs((float)(pm->animations[anim].frameLerp));
01595 }

qboolean PM_CanRollFromSoulCal playerState_t ps  ) 
 

Definition at line 1419 of file bg_panimate.c.

References BOTH_A7_SOULCAL, playerState_s::legsAnim, playerState_s::legsTimer, playerState_t, qboolean, qfalse, and qtrue.

Referenced by PM_MoveForKata().

01420 {
01421         if ( ps->legsAnim == BOTH_A7_SOULCAL
01422                 && ps->legsTimer < 700
01423                 && ps->legsTimer > 250 )
01424         {
01425                 return qtrue;
01426         }
01427         return qfalse;
01428 }

void PM_ContinueLegsAnim int  anim  ) 
 

Definition at line 2621 of file bg_panimate.c.

References playerState_s::legsAnim, playerState_s::legsTimer, pm, and pmove_t::ps.

Referenced by PM_AdjustStandAnimForSlope(), and PmoveSingle().

02621                                      {
02622         if ( ( pm->ps->legsAnim ) == anim ) {
02623                 return;
02624         }
02625         if ( pm->ps->legsTimer > 0 ) {
02626                 return;         // a high priority animation is running
02627         }
02628 
02629         BG_StartLegsAnim( pm->ps, anim );
02630 }

void PM_DebugLegsAnim int  anim  ) 
 

Definition at line 1597 of file bg_panimate.c.

References animTable, BOTH_DEATH1, Com_Printf(), playerState_s::legsAnim, pm, and pmove_t::ps.

01598 {
01599         int oldAnim = (pm->ps->legsAnim);
01600         int newAnim = (anim);
01601 
01602         if (oldAnim < MAX_TOTALANIMATIONS && oldAnim >= BOTH_DEATH1 &&
01603                 newAnim < MAX_TOTALANIMATIONS && newAnim >= BOTH_DEATH1)
01604         {
01605                 Com_Printf("OLD: %s\n", animTable[oldAnim]);
01606                 Com_Printf("NEW: %s\n", animTable[newAnim]);
01607         }
01608 }

void PM_ForceLegsAnim int  anim  ) 
 

Definition at line 2632 of file bg_panimate.c.

References BG_InRoll(), BG_InSpecialJump(), playerState_s::legsAnim, playerState_s::legsTimer, pm, and pmove_t::ps.

02632                                  {
02633         if (BG_InSpecialJump(pm->ps->legsAnim) &&
02634                 pm->ps->legsTimer > 0 &&
02635                 !BG_InSpecialJump(anim))
02636         {
02637                 return;
02638         }
02639 
02640         if (BG_InRoll(pm->ps, pm->ps->legsAnim) &&
02641                 pm->ps->legsTimer > 0 &&
02642                 !BG_InRoll(pm->ps, anim))
02643         {
02644                 return;
02645         }
02646 
02647         pm->ps->legsTimer = 0;
02648         BG_StartLegsAnim( pm->ps, anim );
02649 }

qboolean PM_InCartwheel int  anim  ) 
 

Definition at line 995 of file bg_panimate.c.

References BOTH_ARIAL_F1, BOTH_ARIAL_LEFT, BOTH_ARIAL_RIGHT, BOTH_CARTWHEEL_LEFT, BOTH_CARTWHEEL_RIGHT, qboolean, qfalse, and qtrue.

Referenced by NPC_ChoosePainAnimation().

00996 {
00997         switch ( anim )
00998         {
00999         case BOTH_ARIAL_LEFT:
01000         case BOTH_ARIAL_RIGHT:
01001         case BOTH_ARIAL_F1:
01002         case BOTH_CARTWHEEL_LEFT:
01003         case BOTH_CARTWHEEL_RIGHT:
01004                 return qtrue;
01005                 break;
01006         }
01007         return qfalse;
01008 }

qboolean PM_InKnockDown playerState_t ps  ) 
 

Definition at line 1216 of file bg_panimate.c.

References BOTH_FORCE_GETUP_B1, BOTH_FORCE_GETUP_B2, BOTH_FORCE_GETUP_B3, BOTH_FORCE_GETUP_B4, BOTH_FORCE_GETUP_B5, BOTH_FORCE_GETUP_F1, BOTH_FORCE_GETUP_F2, BOTH_GETUP1, BOTH_GETUP2, BOTH_GETUP3, BOTH_GETUP4, BOTH_GETUP5, BOTH_GETUP_BROLL_B, BOTH_GETUP_BROLL_F, BOTH_GETUP_BROLL_L, BOTH_GETUP_BROLL_R, BOTH_GETUP_FROLL_B, BOTH_GETUP_FROLL_F, BOTH_GETUP_FROLL_L, BOTH_GETUP_FROLL_R, BOTH_KNOCKDOWN1, BOTH_KNOCKDOWN2, BOTH_KNOCKDOWN3, BOTH_KNOCKDOWN4, BOTH_KNOCKDOWN5, playerState_s::legsAnim, playerState_s::legsTimer, playerState_t, qboolean, qfalse, and qtrue.

Referenced by CG_DrawActiveFrame(), Jedi_CheckFlipEvasions(), Jedi_SaberBlockGo(), NPC_CheckSurrender(), NPC_ChoosePainAnimation(), NPC_MoveToGoal(), NPC_Surrender(), PM_SetSaberMove(), PM_WeaponLightsaber(), WP_ResistForcePush(), and WP_SaberStartMissileBlockCheck().

01217 {
01218         switch ( (ps->legsAnim) )
01219         {
01220         case BOTH_KNOCKDOWN1:
01221         case BOTH_KNOCKDOWN2:
01222         case BOTH_KNOCKDOWN3:
01223         case BOTH_KNOCKDOWN4:
01224         case BOTH_KNOCKDOWN5:
01225                 return qtrue;
01226                 break;
01227         case BOTH_GETUP1:
01228         case BOTH_GETUP2:
01229         case BOTH_GETUP3:
01230         case BOTH_GETUP4:
01231         case BOTH_GETUP5:
01232         case BOTH_FORCE_GETUP_F1:
01233         case BOTH_FORCE_GETUP_F2:
01234         case BOTH_FORCE_GETUP_B1:
01235         case BOTH_FORCE_GETUP_B2:
01236         case BOTH_FORCE_GETUP_B3:
01237         case BOTH_FORCE_GETUP_B4:
01238         case BOTH_FORCE_GETUP_B5:
01239         case BOTH_GETUP_BROLL_B:
01240         case BOTH_GETUP_BROLL_F:
01241         case BOTH_GETUP_BROLL_L:
01242         case BOTH_GETUP_BROLL_R:
01243         case BOTH_GETUP_FROLL_B:
01244         case BOTH_GETUP_FROLL_F:
01245         case BOTH_GETUP_FROLL_L:
01246         case BOTH_GETUP_FROLL_R:
01247                 if ( ps->legsTimer )
01248                 {
01249                         return qtrue;
01250                 }
01251                 break;
01252         }
01253         return qfalse;
01254 }

qboolean PM_InOnGroundAnim int  anim  ) 
 

Definition at line 1351 of file bg_panimate.c.

References BOTH_DEAD1, BOTH_DEAD2, BOTH_DEAD3, BOTH_DEAD4, BOTH_DEAD5, BOTH_DEADBACKWARD1, BOTH_DEADBACKWARD2, BOTH_DEADFORWARD1, BOTH_DEADFORWARD2, BOTH_FORCE_GETUP_B1, BOTH_FORCE_GETUP_B2, BOTH_FORCE_GETUP_B3, BOTH_FORCE_GETUP_B4, BOTH_FORCE_GETUP_B5, BOTH_FORCE_GETUP_B6, BOTH_FORCE_GETUP_F1, BOTH_FORCE_GETUP_F2, BOTH_GETUP1, BOTH_GETUP2, BOTH_GETUP3, BOTH_GETUP4, BOTH_GETUP5, BOTH_GETUP_BROLL_B, BOTH_GETUP_BROLL_F, BOTH_GETUP_BROLL_L, BOTH_GETUP_BROLL_R, BOTH_GETUP_CROUCH_B1, BOTH_GETUP_CROUCH_F1, BOTH_GETUP_FROLL_B, BOTH_GETUP_FROLL_F, BOTH_GETUP_FROLL_L, BOTH_GETUP_FROLL_R, BOTH_KNOCKDOWN1, BOTH_KNOCKDOWN2, BOTH_KNOCKDOWN3, BOTH_KNOCKDOWN4, BOTH_KNOCKDOWN5, BOTH_LYINGDEAD1, BOTH_LYINGDEATH1, BOTH_SLEEP1, qboolean, qfalse, and qtrue.

01352 {
01353         switch( anim )
01354         {
01355         case BOTH_DEAD1:
01356         case BOTH_DEAD2:
01357         case BOTH_DEAD3:
01358         case BOTH_DEAD4:
01359         case BOTH_DEAD5:
01360         case BOTH_DEADFORWARD1:
01361         case BOTH_DEADBACKWARD1:
01362         case BOTH_DEADFORWARD2:
01363         case BOTH_DEADBACKWARD2:
01364         case BOTH_LYINGDEATH1:
01365         case BOTH_LYINGDEAD1:
01366         case BOTH_SLEEP1:                       //# laying on back-rknee up-rhand on torso
01367         case BOTH_KNOCKDOWN1:           //# 
01368         case BOTH_KNOCKDOWN2:           //# 
01369         case BOTH_KNOCKDOWN3:           //# 
01370         case BOTH_KNOCKDOWN4:           //# 
01371         case BOTH_KNOCKDOWN5:           //# 
01372         case BOTH_GETUP1:
01373         case BOTH_GETUP2:
01374         case BOTH_GETUP3:
01375         case BOTH_GETUP4:
01376         case BOTH_GETUP5:
01377         case BOTH_GETUP_CROUCH_F1:
01378         case BOTH_GETUP_CROUCH_B1:
01379         case BOTH_FORCE_GETUP_F1:
01380         case BOTH_FORCE_GETUP_F2:
01381         case BOTH_FORCE_GETUP_B1:
01382         case BOTH_FORCE_GETUP_B2:
01383         case BOTH_FORCE_GETUP_B3:
01384         case BOTH_FORCE_GETUP_B4:
01385         case BOTH_FORCE_GETUP_B5:
01386         case BOTH_FORCE_GETUP_B6:
01387         case BOTH_GETUP_BROLL_B:
01388         case BOTH_GETUP_BROLL_F:
01389         case BOTH_GETUP_BROLL_L:
01390         case BOTH_GETUP_BROLL_R:
01391         case BOTH_GETUP_FROLL_B:
01392         case BOTH_GETUP_FROLL_F:
01393         case BOTH_GETUP_FROLL_L:
01394         case BOTH_GETUP_FROLL_R:
01395                 return qtrue;
01396                 break;
01397         }
01398 
01399         return qfalse;
01400 }

qboolean PM_InRollComplete playerState_t ps,
int  anim
 

Definition at line 1402 of file bg_panimate.c.

References BOTH_ROLL_B, BOTH_ROLL_F, BOTH_ROLL_L, BOTH_ROLL_R, playerState_s::legsTimer, playerState_t, qboolean, qfalse, and qtrue.

01403 {
01404         switch ( (anim) )
01405         {
01406         case BOTH_ROLL_F:
01407         case BOTH_ROLL_B:
01408         case BOTH_ROLL_R:
01409         case BOTH_ROLL_L:
01410                 if ( ps->legsTimer < 1 )
01411                 {
01412                         return qtrue;
01413                 }
01414                 break;
01415         }
01416         return qfalse;
01417 }

qboolean PM_InSaberAnim int  anim  ) 
 

Definition at line 1207 of file bg_panimate.c.

References BOTH_A1_T__B_, BOTH_H1_S1_BR, qboolean, qfalse, and qtrue.

Referenced by BG_SaberStartTransAnim(), and WP_SaberCanBlock().

01208 {
01209         if ( (anim) >= BOTH_A1_T__B_ && (anim) <= BOTH_H1_S1_BR )
01210         {
01211                 return qtrue;
01212         }
01213         return qfalse;
01214 }

qboolean PM_JumpingAnim int  anim  ) 
 

Definition at line 1284 of file bg_panimate.c.

References BOTH_FORCEINAIR1, BOTH_FORCEINAIRBACK1, BOTH_FORCEINAIRLEFT1, BOTH_FORCEINAIRRIGHT1, BOTH_FORCEJUMP1, BOTH_FORCEJUMPBACK1, BOTH_FORCEJUMPLEFT1, BOTH_FORCEJUMPRIGHT1, BOTH_FORCELAND1, BOTH_FORCELANDBACK1, BOTH_FORCELANDLEFT1, BOTH_FORCELANDRIGHT1, BOTH_INAIR1, BOTH_INAIRBACK1, BOTH_INAIRLEFT1, BOTH_INAIRRIGHT1, BOTH_JUMP1, BOTH_JUMPBACK1, BOTH_JUMPLEFT1, BOTH_JUMPRIGHT1, BOTH_LAND1, BOTH_LAND2, BOTH_LANDBACK1, BOTH_LANDLEFT1, BOTH_LANDRIGHT1, qboolean, qfalse, and qtrue.

Referenced by PM_SetSaberMove(), and PM_WeaponLightsaber().

01285 {
01286         switch ( (anim) )
01287         {
01288                 case BOTH_JUMP1:                                //# Jump - wind-up and leave ground
01289                 case BOTH_INAIR1:                       //# In air loop (from jump)
01290                 case BOTH_LAND1:                                //# Landing (from in air loop)
01291                 case BOTH_LAND2:                                //# Landing Hard (from a great height)
01292                 case BOTH_JUMPBACK1:                    //# Jump backwards - wind-up and leave ground
01293                 case BOTH_INAIRBACK1:           //# In air loop (from jump back)
01294                 case BOTH_LANDBACK1:                    //# Landing backwards(from in air loop)
01295                 case BOTH_JUMPLEFT1:                    //# Jump left - wind-up and leave ground
01296                 case BOTH_INAIRLEFT1:           //# In air loop (from jump left)
01297                 case BOTH_LANDLEFT1:                    //# Landing left(from in air loop)
01298                 case BOTH_JUMPRIGHT1:           //# Jump right - wind-up and leave ground
01299                 case BOTH_INAIRRIGHT1:          //# In air loop (from jump right)
01300                 case BOTH_LANDRIGHT1:           //# Landing right(from in air loop)
01301                 case BOTH_FORCEJUMP1:                           //# Jump - wind-up and leave ground
01302                 case BOTH_FORCEINAIR1:                  //# In air loop (from jump)
01303                 case BOTH_FORCELAND1:                           //# Landing (from in air loop)
01304                 case BOTH_FORCEJUMPBACK1:                       //# Jump backwards - wind-up and leave ground
01305                 case BOTH_FORCEINAIRBACK1:              //# In air loop (from jump back)
01306                 case BOTH_FORCELANDBACK1:                       //# Landing backwards(from in air loop)
01307                 case BOTH_FORCEJUMPLEFT1:                       //# Jump left - wind-up and leave ground
01308                 case BOTH_FORCEINAIRLEFT1:              //# In air loop (from jump left)
01309                 case BOTH_FORCELANDLEFT1:                       //# Landing left(from in air loop)
01310                 case BOTH_FORCEJUMPRIGHT1:              //# Jump right - wind-up and leave ground
01311                 case BOTH_FORCEINAIRRIGHT1:             //# In air loop (from jump right)
01312                 case BOTH_FORCELANDRIGHT1:              //# Landing right(from in air loop)
01313                 return qtrue;
01314                 break;
01315         }
01316         return qfalse;
01317 }

qboolean PM_LandingAnim int  anim  ) 
 

Definition at line 1319 of file bg_panimate.c.

References BOTH_FORCELAND1, BOTH_FORCELANDBACK1, BOTH_FORCELANDLEFT1, BOTH_FORCELANDRIGHT1, BOTH_LAND1, BOTH_LAND2, BOTH_LANDBACK1, BOTH_LANDLEFT1, BOTH_LANDRIGHT1, qboolean, qfalse, and qtrue.

01320 {
01321         switch ( (anim) )
01322         {
01323                 case BOTH_LAND1:                                //# Landing (from in air loop)
01324                 case BOTH_LAND2:                                //# Landing Hard (from a great height)
01325                 case BOTH_LANDBACK1:                    //# Landing backwards(from in air loop)
01326                 case BOTH_LANDLEFT1:                    //# Landing left(from in air loop)
01327                 case BOTH_LANDRIGHT1:           //# Landing right(from in air loop)
01328                 case BOTH_FORCELAND1:           //# Landing (from in air loop)
01329                 case BOTH_FORCELANDBACK1:       //# Landing backwards(from in air loop)
01330                 case BOTH_FORCELANDLEFT1:       //# Landing left(from in air loop)
01331                 case BOTH_FORCELANDRIGHT1:      //# Landing right(from in air loop)
01332                 return qtrue;
01333                 break;
01334         }
01335         return qfalse;
01336 }

qboolean PM_PainAnim int  anim  ) 
 

Definition at line 1256 of file bg_panimate.c.

References BOTH_PAIN1, BOTH_PAIN10, BOTH_PAIN11, BOTH_PAIN12, BOTH_PAIN13, BOTH_PAIN14, BOTH_PAIN15, BOTH_PAIN16, BOTH_PAIN17, BOTH_PAIN18, BOTH_PAIN2, BOTH_PAIN3, BOTH_PAIN4, BOTH_PAIN5, BOTH_PAIN6, BOTH_PAIN7, BOTH_PAIN8, BOTH_PAIN9, qboolean, qfalse, and qtrue.

01257 {
01258         switch ( (anim) )
01259         {
01260                 case BOTH_PAIN1:                                //# First take pain anim
01261                 case BOTH_PAIN2:                                //# Second take pain anim
01262                 case BOTH_PAIN3:                                //# Third take pain anim
01263                 case BOTH_PAIN4:                                //# Fourth take pain anim
01264                 case BOTH_PAIN5:                                //# Fifth take pain anim - from behind
01265                 case BOTH_PAIN6:                                //# Sixth take pain anim - from behind
01266                 case BOTH_PAIN7:                                //# Seventh take pain anim - from behind
01267                 case BOTH_PAIN8:                                //# Eigth take pain anim - from behind
01268                 case BOTH_PAIN9:                                //# 
01269                 case BOTH_PAIN10:                       //# 
01270                 case BOTH_PAIN11:                       //# 
01271                 case BOTH_PAIN12:                       //# 
01272                 case BOTH_PAIN13:                       //# 
01273                 case BOTH_PAIN14:                       //# 
01274                 case BOTH_PAIN15:                       //# 
01275                 case BOTH_PAIN16:                       //# 
01276                 case BOTH_PAIN17:                       //# 
01277                 case BOTH_PAIN18:                       //# 
01278                 return qtrue;
01279                 break;
01280         }
01281         return qfalse;
01282 }

qboolean PM_RunningAnim int  anim  ) 
 

Definition at line 4601 of file bg_pmove.c.

04602 {
04603         switch ( (anim) )
04604         {
04605         case BOTH_RUN1:                 
04606         case BOTH_RUN2:                 
04607         case BOTH_RUN_STAFF:
04608         case BOTH_RUN_DUAL:
04609         case BOTH_RUNBACK1:                     
04610         case BOTH_RUNBACK2:                     
04611         case BOTH_RUNBACK_STAFF:                        
04612         case BOTH_RUNBACK_DUAL:
04613         case BOTH_RUN1START:                    //# Start into full run1
04614         case BOTH_RUN1STOP:                     //# Stop from full run1
04615         case BOTH_RUNSTRAFE_LEFT1:      //# Sidestep left: should loop
04616         case BOTH_RUNSTRAFE_RIGHT1:     //# Sidestep right: should loop
04617                 return qtrue;
04618                 break;
04619         }
04620         return qfalse;
04621 }

int PM_SaberBounceForAttack int  move  ) 
 

Definition at line 1086 of file bg_panimate.c.

References LS_B1__L, LS_B1__R, LS_B1_BL, LS_B1_BR, LS_B1_T_, LS_B1_TL, LS_B1_TR, LS_NONE, Q_B, Q_BL, Q_BR, Q_L, Q_R, Q_T, Q_TL, Q_TR, saberMoveData, and saberMoveData_t::startQuad.

Referenced by PM_WeaponLightsaber().

01087 {
01088         switch ( saberMoveData[move].startQuad )
01089         {
01090         case Q_B:
01091         case Q_BR:
01092                 return LS_B1_BR;
01093                 break;
01094         case Q_R:
01095                 return LS_B1__R;
01096                 break;
01097         case Q_TR:
01098                 return LS_B1_TR;
01099                 break;
01100         case Q_T:
01101                 return LS_B1_T_;
01102                 break;
01103         case Q_TL:
01104                 return LS_B1_TL;
01105                 break;
01106         case Q_L:
01107                 return LS_B1__L;
01108                 break;
01109         case Q_BL:
01110                 return LS_B1_BL;
01111                 break;
01112         }
01113         return LS_NONE;
01114 }

int PM_SaberDeflectionForQuad int  quad  ) 
 

Definition at line 1116 of file bg_panimate.c.

References LS_D1__L, LS_D1__R, LS_D1_B_, LS_D1_BL, LS_D1_BR, LS_D1_T_, LS_D1_TL, LS_D1_TR, LS_NONE, Q_B, Q_BL, Q_BR, Q_L, Q_R, Q_T, Q_TL, and Q_TR.

01117 {
01118         switch ( quad )
01119         {
01120         case Q_B:
01121                 return LS_D1_B_;
01122                 break;
01123         case Q_BR:
01124                 return LS_D1_BR;
01125                 break;
01126         case Q_R:
01127                 return LS_D1__R;
01128                 break;
01129         case Q_TR:
01130                 return LS_D1_TR;
01131                 break;
01132         case Q_T:
01133                 return LS_D1_T_;
01134                 break;
01135         case Q_TL:
01136                 return LS_D1_TL;
01137                 break;
01138         case Q_L:
01139                 return LS_D1__L;
01140                 break;
01141         case Q_BL:
01142                 return LS_D1_BL;
01143                 break;
01144         }
01145         return LS_NONE;
01146 }

qboolean PM_SaberInDeflect int  move  ) 
 

Definition at line 1148 of file bg_panimate.c.

References LS_D1_B_, LS_D1_BR, qboolean, qfalse, and qtrue.

01149 {
01150         if ( move >= LS_D1_BR && move <= LS_D1_B_ )
01151         {
01152                 return qtrue;
01153         }
01154         return qfalse;
01155 }

qboolean PM_SaberInKnockaway int  move  ) 
 

Definition at line 1166 of file bg_panimate.c.

References LS_K1_BL, LS_K1_T_, qboolean, qfalse, and qtrue.

Referenced by PM_SetSaberMove().

01167 {
01168         if ( move >= LS_K1_T_ && move <= LS_K1_BL )
01169         {
01170                 return qtrue;
01171         }
01172         return qfalse;
01173 }

qboolean PM_SaberInParry int  move  ) 
 

Definition at line 1157 of file bg_panimate.c.

References LS_PARRY_LL, LS_PARRY_UP, qboolean, qfalse, and qtrue.

Referenced by PM_SetSaberMove().

01158 {
01159         if ( move >= LS_PARRY_UP && move <= LS_PARRY_LL )
01160         {
01161                 return qtrue;
01162         }
01163         return qfalse;
01164 }

qboolean PM_SaberInReflect int  move  ) 
 

Definition at line 1175 of file bg_panimate.c.

References LS_REFLECT_LL, LS_REFLECT_UP, qboolean, qfalse, and qtrue.

Referenced by PM_CheckPullAttack(), and PM_SetSaberMove().

01176 {
01177         if ( move >= LS_REFLECT_UP && move <= LS_REFLECT_LL )
01178         {
01179                 return qtrue;
01180         }
01181         return qfalse;
01182 }

qboolean PM_SaberInReturn int  move  ) 
 

Definition at line 1193 of file bg_panimate.c.

References LS_R_T2B, LS_R_TL2BR, qboolean, qfalse, and qtrue.

Referenced by BG_SaberInReturn(), BG_SaberInTransitionAny(), ClientThink_real(), PM_CheckPullAttack(), and PM_WeaponLightsaber().

01194 {
01195         if ( move >= LS_R_TL2BR && move <= LS_R_T2B )
01196         {
01197                 return qtrue;
01198         }
01199         return qfalse;
01200 }

qboolean PM_SaberInStart int  move  ) 
 

Definition at line 1184 of file bg_panimate.c.

References LS_S_T2B, LS_S_TL2BR, qboolean, qfalse, and qtrue.

Referenced by BG_SaberInTransitionAny(), ClientThink_real(), Jedi_CheckFlipEvasions(), Jedi_SaberBlockGo(), and PM_SaberMoveOkayForKata().

01185 {
01186         if ( move >= LS_S_TL2BR && move <= LS_S_T2B )
01187         {
01188                 return qtrue;
01189         }
01190         return qfalse;
01191 }

qboolean PM_SaberInTransition int  move  ) 
 

Definition at line 1610 of file bg_panimate.c.

References LS_T1_BL__L, LS_T1_BR__R, qboolean, qfalse, and qtrue.

Referenced by BG_AdjustClientSpeed(), BG_SaberInTransitionAny(), ClientThink_real(), PM_WeaponLightsaber(), and WP_SaberPositionUpdate().

01611 {
01612         if ( move >= LS_T1_BR__R && move <= LS_T1_BL__L )
01613         {
01614                 return qtrue;
01615         }
01616         return qfalse;
01617 }

void PM_SetAnim int  setAnimParts,
int  anim,
int  setAnimFlags,
int  blendTime
 

Definition at line 3032 of file bg_panimate.c.

References pmove_t::animations, BG_SetAnim(), pm, and pmove_t::ps.

03033 {       
03034         BG_SetAnim(pm->ps, pm->animations, setAnimParts, anim, setAnimFlags, blendTime);
03035 }

void PM_SetAnimFinal int  setAnimParts,
int  anim,
int  setAnimFlags,
int  blendTime
 

Definition at line 2921 of file bg_panimate.c.

References pmove_t::animations, BG_SetAnimFinal(), pm, and pmove_t::ps.

02923 {
02924         BG_SetAnimFinal(pm->ps, pm->animations, setAnimParts, anim, setAnimFlags, blendTime);
02925 }

void PM_SetLegsAnimTimer int  time  ) 
 

Definition at line 2703 of file bg_panimate.c.

References BG_SetLegsAnimTimer(), pm, and pmove_t::ps.

02704 {
02705         BG_SetLegsAnimTimer(pm->ps, time);
02706 }

void PM_SetTorsoAnimTimer int  time  ) 
 

Definition at line 2723 of file bg_panimate.c.

References BG_SetTorsoAnimTimer(), pm, and pmove_t::ps.

02724 {
02725         BG_SetTorsoAnimTimer(pm->ps, time);
02726 }

qboolean PM_SpinningAnim int  anim  ) 
 

Definition at line 1338 of file bg_panimate.c.

References BG_SpinningSaberAnim(), and qboolean.

Referenced by NPC_ChoosePainAnimation().

01339 {
01340         /*
01341         switch ( anim )
01342         {
01343         //FIXME: list any other spinning anims
01344         default:
01345                 break;
01346         }
01347         */
01348         return BG_SpinningSaberAnim( anim );
01349 }

void PM_StartTorsoAnim int  anim  ) 
 

Definition at line 2682 of file bg_panimate.c.

References BG_StartTorsoAnim(), pm, and pmove_t::ps.

02683 {
02684     BG_StartTorsoAnim(pm->ps, anim);
02685 }

qboolean PM_WalkingAnim int  anim  ) 
 

Definition at line 4580 of file bg_pmove.c.

04581 {
04582         switch ( anim )
04583         {
04584         case BOTH_WALK1:                                //# Normal walk
04585         case BOTH_WALK2:                                //# Normal walk with saber
04586         case BOTH_WALK_STAFF:                   //# Normal walk with staff
04587         case BOTH_WALK_DUAL:                    //# Normal walk with staff
04588         case BOTH_WALK5:                                //# Tavion taunting Kyle (cin 22)
04589         case BOTH_WALK6:                                //# Slow walk for Luke (cin 12)
04590         case BOTH_WALK7:                                //# Fast walk
04591         case BOTH_WALKBACK1:                    //# Walk1 backwards
04592         case BOTH_WALKBACK2:                    //# Walk2 backwards
04593         case BOTH_WALKBACK_STAFF:               //# Walk backwards with staff
04594         case BOTH_WALKBACK_DUAL:                //# Walk backwards with dual
04595                 return qtrue;
04596                 break;
04597         }
04598         return qfalse;
04599 }


Variable Documentation

stringID_table_t animEventTypeTable[MAX_ANIM_EVENTS+1]
 

Initial value:

 
{
        ENUM2STRING(AEV_SOUND),                 
        ENUM2STRING(AEV_FOOTSTEP),              
        ENUM2STRING(AEV_EFFECT),                
        ENUM2STRING(AEV_FIRE),                  
        ENUM2STRING(AEV_MOVE),                  
        ENUM2STRING(AEV_SOUNDCHAN),             
        ENUM2STRING(AEV_SABER_SWING),   
        ENUM2STRING(AEV_SABER_SPIN),    
        
        NULL,-1
}

Definition at line 1758 of file bg_panimate.c.

Referenced by ParseAnimationEvtBlock().

bgLoadedAnim_t bgAllAnims[MAX_ANIM_FILES]
 

Definition at line 1702 of file bg_panimate.c.

Referenced by AnimateRiders(), BG_AnimLength(), BG_AnimsetAlloc(), BG_HasAnimation(), BG_InitAnimsets(), BG_ParseAnimationEvtFile(), BG_ParseAnimationFile(), BG_SetAnim(), CG_PlayerAnimEvents(), CG_PredictPlayerState(), CG_RagDoll(), ClientThink_real(), G_SetAnim(), G_UpdateClientAnims(), Initialize(), ItemParse_asset_model_go(), NPC_ChoosePainAnimation(), UI_AnimsetAlloc(), UI_ParseAnimationFile(), UpdateClientRenderinfo(), and Vehicle_SetAnim().

bgLoadedEvents_t bgAllEvents[MAX_ANIM_FILES]
 

Definition at line 2166 of file bg_panimate.c.

Referenced by BG_ParseAnimationEvtFile(), and CG_PlayerAnimEvents().

animation_t bgHumanoidAnimations[MAX_TOTALANIMATIONS]
 

Definition at line 1672 of file bg_panimate.c.

Referenced by BG_IK_MoveArm(), BG_ParseAnimationFile(), CG_NewClientInfo(), NPC_ChoosePainAnimation(), SetupGameGhoul2Model(), and SP_worldspawn().

int bgNumAllAnims = 2
 

Definition at line 1703 of file bg_panimate.c.

Referenced by BG_AnimsetAlloc(), BG_HasAnimation(), and BG_ParseAnimationFile().

int bgNumAnimEvents = 1
 

Definition at line 2167 of file bg_panimate.c.

Referenced by BG_ParseAnimationEvtFile(), CG_CacheG2AnimInfo(), CG_G2AnimEntModelLoad(), and CG_G2EvIndexForModel().

qboolean BGPAFtextLoaded = qfalse
 

Definition at line 1671 of file bg_panimate.c.

Referenced by BG_InitAnimsets(), BG_ParseAnimationFile(), SetupGameGhoul2Model(), and SP_worldspawn().

stringID_table_t footstepTypeTable[NUM_FOOTSTEP_TYPES+1]
 

Initial value:

 
{
        ENUM2STRING(FOOTSTEP_R),
        ENUM2STRING(FOOTSTEP_L),
        ENUM2STRING(FOOTSTEP_HEAVY_R),
        ENUM2STRING(FOOTSTEP_HEAVY_L),
        
        NULL,-1
}

Definition at line 1772 of file bg_panimate.c.

Referenced by ParseAnimationEvtBlock().