codemp/game/bg_saber.c

Go to the documentation of this file.
00001 #include "q_shared.h"
00002 #include "bg_public.h"
00003 #include "bg_local.h"
00004 #include "w_saber.h"
00005 
00006 #include "../namespace_begin.h"
00007 extern qboolean BG_SabersOff( playerState_t *ps );
00008 saberInfo_t *BG_MySaber( int clientNum, int saberNum );
00009 
00010 int PM_irand_timesync(int val1, int val2)
00011 {
00012         int i;
00013 
00014         i = (val1-1) + (Q_random( &pm->cmd.serverTime )*(val2 - val1)) + 1;
00015         if (i < val1)
00016         {
00017                 i = val1;
00018         }
00019         if (i > val2)
00020         {
00021                 i = val2;
00022         }
00023 
00024         return i;
00025 }
00026 
00027 void BG_ForcePowerDrain( playerState_t *ps, forcePowers_t forcePower, int overrideAmt )
00028 {
00029         //take away the power
00030         int     drain = overrideAmt;
00031 
00032         /*
00033         if (ps->powerups[PW_FORCE_BOON])
00034         {
00035                 return;
00036         }
00037         */
00038         //No longer grant infinite force with boon.
00039 
00040         if ( !drain )
00041         {
00042                 drain = forcePowerNeeded[ps->fd.forcePowerLevel[forcePower]][forcePower];
00043         }
00044         if ( !drain )
00045         {
00046                 return;
00047         }
00048 
00049         if (forcePower == FP_LEVITATION)
00050         { //special case
00051                 int jumpDrain = 0;
00052 
00053                 if (ps->velocity[2] > 250)
00054                 {
00055                         jumpDrain = 20;
00056                 }
00057                 else if (ps->velocity[2] > 200)
00058                 {
00059                         jumpDrain = 16;
00060                 }
00061                 else if (ps->velocity[2] > 150)
00062                 {
00063                         jumpDrain = 12;
00064                 }
00065                 else if (ps->velocity[2] > 100)
00066                 {
00067                         jumpDrain = 8;
00068                 }
00069                 else if (ps->velocity[2] > 50)
00070                 {
00071                         jumpDrain = 6;
00072                 }
00073                 else if (ps->velocity[2] > 0)
00074                 {
00075                         jumpDrain = 4;
00076                 }
00077 
00078                 if (jumpDrain)
00079                 {
00080                         if (ps->fd.forcePowerLevel[FP_LEVITATION])
00081                         { //don't divide by 0!
00082                                 jumpDrain /= ps->fd.forcePowerLevel[FP_LEVITATION];
00083                         }
00084                 }
00085 
00086                 ps->fd.forcePower -= jumpDrain;
00087                 if ( ps->fd.forcePower < 0 )
00088                 {
00089                         ps->fd.forcePower = 0;
00090                 }
00091 
00092                 return;
00093         }
00094 
00095         ps->fd.forcePower -= drain;
00096         if ( ps->fd.forcePower < 0 )
00097         {
00098                 ps->fd.forcePower = 0;
00099         }
00100 }
00101 
00102 qboolean BG_EnoughForcePowerForMove( int cost )
00103 {
00104         if ( pm->ps->fd.forcePower < cost )
00105         {
00106                 PM_AddEvent( EV_NOAMMO );
00107                 return qfalse;
00108         }
00109 
00110         return qtrue;
00111 }
00112 
00113 // Silly, but I'm replacing these macros so they are shorter!
00114 #define AFLAG_IDLE      (SETANIM_FLAG_NORMAL)
00115 #define AFLAG_ACTIVE (SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD | SETANIM_FLAG_HOLDLESS)
00116 #define AFLAG_WAIT (SETANIM_FLAG_HOLD | SETANIM_FLAG_HOLDLESS)
00117 #define AFLAG_FINISH (SETANIM_FLAG_HOLD)
00118 
00119 //FIXME: add the alternate anims for each style?
00120 saberMoveData_t saberMoveData[LS_MOVE_MAX] = {//                                                        NB:randomized
00121         // name                 anim(do all styles?)startQ      endQ    setanimflag             blend,  blocking        chain_idle              chain_attack    trailLen
00122         {"None",                BOTH_STAND1,            Q_R,    Q_R,    AFLAG_IDLE,             350,    BLK_NO,         LS_NONE,                LS_NONE,                0       },      // LS_NONE              = 0,
00123 
00124         // General movements with saber
00125         {"Ready",               BOTH_STAND2,            Q_R,    Q_R,    AFLAG_IDLE,             350,    BLK_WIDE,       LS_READY,               LS_S_R2L,               0       },      // LS_READY,
00126         {"Draw",                BOTH_STAND1TO2,         Q_R,    Q_R,    AFLAG_FINISH,   350,    BLK_NO,         LS_READY,               LS_S_R2L,               0       },      // LS_DRAW,
00127         {"Putaway",             BOTH_STAND2TO1,         Q_R,    Q_R,    AFLAG_FINISH,   350,    BLK_NO,         LS_READY,               LS_S_R2L,               0       },      // LS_PUTAWAY,
00128 
00129         // Attacks
00130         //UL2LR
00131         {"TL2BR Att",   BOTH_A1_TL_BR,          Q_TL,   Q_BR,   AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_R_TL2BR,             LS_R_TL2BR,             200     },      // LS_A_TL2BR
00132         //SLASH LEFT
00133         {"L2R Att",             BOTH_A1__L__R,          Q_L,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_R_L2R,               LS_R_L2R,               200 },  // LS_A_L2R
00134         //LL2UR
00135         {"BL2TR Att",   BOTH_A1_BL_TR,          Q_BL,   Q_TR,   AFLAG_ACTIVE,   50,             BLK_TIGHT,      LS_R_BL2TR,             LS_R_BL2TR,             200     },      // LS_A_BL2TR
00136         //LR2UL
00137         {"BR2TL Att",   BOTH_A1_BR_TL,          Q_BR,   Q_TL,   AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_R_BR2TL,             LS_R_BR2TL,             200     },      // LS_A_BR2TL
00138         //SLASH RIGHT
00139         {"R2L Att",             BOTH_A1__R__L,          Q_R,    Q_L,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_R_R2L,               LS_R_R2L,               200 },// LS_A_R2L
00140         //UR2LL
00141         {"TR2BL Att",   BOTH_A1_TR_BL,          Q_TR,   Q_BL,   AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_R_TR2BL,             LS_R_TR2BL,             200     },      // LS_A_TR2BL
00142         //SLASH DOWN
00143         {"T2B Att",             BOTH_A1_T__B_,          Q_T,    Q_B,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_R_T2B,               LS_R_T2B,               200     },      // LS_A_T2B
00144         //special attacks
00145         {"Back Stab",   BOTH_A2_STABBACK1,      Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_A_BACKSTAB
00146         {"Back Att",    BOTH_ATTACK_BACK,       Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_A_BACK
00147         {"CR Back Att", BOTH_CROUCHATTACKBACK1,Q_R,     Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_A_BACK_CR
00148         {"RollStab",    BOTH_ROLL_STAB,         Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_ROLL_STAB
00149         {"Lunge Att",   BOTH_LUNGE2_B__T_,      Q_B,    Q_T,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_A_LUNGE
00150         {"Jump Att",    BOTH_FORCELEAP2_T__B_,Q_T,      Q_B,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_A_JUMP_T__B_
00151         {"Flip Stab",   BOTH_JUMPFLIPSTABDOWN,Q_R,      Q_T,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_T1_T___R,    200     },      // LS_A_FLIP_STAB
00152         {"Flip Slash",  BOTH_JUMPFLIPSLASHDOWN1,Q_L,Q_R,        AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_T1__R_T_,    200     },      // LS_A_FLIP_SLASH
00153         {"DualJump Atk",BOTH_JUMPATTACK6,       Q_R,    Q_BL,   AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_T1_BL_TR,    200     },      // LS_JUMPATTACK_DUAL
00154 
00155         {"DualJumpAtkL_A",BOTH_ARIAL_LEFT,      Q_R,    Q_TL,   AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_A_TL2BR,             200     },      // LS_JUMPATTACK_ARIAL_LEFT
00156         {"DualJumpAtkR_A",BOTH_ARIAL_RIGHT,     Q_R,    Q_TR,   AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_A_TR2BL,             200     },      // LS_JUMPATTACK_ARIAL_RIGHT
00157 
00158         {"DualJumpAtkL_A",BOTH_CARTWHEEL_LEFT,  Q_R,Q_TL,       AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_T1_TL_BR,    200     },      // LS_JUMPATTACK_CART_LEFT
00159         {"DualJumpAtkR_A",BOTH_CARTWHEEL_RIGHT, Q_R,Q_TR,       AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_T1_TR_BL,    200     },      // LS_JUMPATTACK_CART_RIGHT
00160         
00161         {"DualJumpAtkLStaff", BOTH_BUTTERFLY_FL1,Q_R,Q_L,       AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_T1__L__R,    200     },      // LS_JUMPATTACK_STAFF_LEFT
00162         {"DualJumpAtkRStaff", BOTH_BUTTERFLY_FR1,Q_R,Q_R,       AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_T1__R__L,    200     },      // LS_JUMPATTACK_STAFF_RIGHT
00163 
00164         {"ButterflyLeft", BOTH_BUTTERFLY_LEFT,Q_R,Q_L,          AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_T1__L__R,    200     },      // LS_BUTTERFLY_LEFT
00165         {"ButterflyRight", BOTH_BUTTERFLY_RIGHT,Q_R,Q_R,        AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_T1__R__L,    200     },      // LS_BUTTERFLY_RIGHT
00166         
00167         {"BkFlip Atk",  BOTH_JUMPATTACK7,       Q_B,    Q_T,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_T1_T___R,    200     },      // LS_A_BACKFLIP_ATK
00168         {"DualSpinAtk", BOTH_SPINATTACK6,       Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_SPINATTACK_DUAL
00169         {"StfSpinAtk",  BOTH_SPINATTACK7,       Q_L,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_SPINATTACK
00170         {"LngLeapAtk",  BOTH_FORCELONGLEAP_ATTACK,Q_R,Q_L,      AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_LEAP_ATTACK
00171         {"SwoopAtkR",   BOTH_VS_ATR_S,          Q_R,    Q_T,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_SWOOP_ATTACK_RIGHT
00172         {"SwoopAtkL",   BOTH_VS_ATL_S,          Q_L,    Q_T,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_SWOOP_ATTACK_LEFT
00173         {"TauntaunAtkR",BOTH_VT_ATR_S,          Q_R,    Q_T,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_TAUNTAUN_ATTACK_RIGHT
00174         {"TauntaunAtkL",BOTH_VT_ATL_S,          Q_L,    Q_T,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_TAUNTAUN_ATTACK_LEFT
00175         {"StfKickFwd",  BOTH_A7_KICK_F,         Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_KICK_F
00176         {"StfKickBack", BOTH_A7_KICK_B,         Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_KICK_B
00177         {"StfKickRight",BOTH_A7_KICK_R,         Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_KICK_R
00178         {"StfKickLeft", BOTH_A7_KICK_L,         Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_KICK_L
00179         {"StfKickSpin", BOTH_A7_KICK_S,         Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_NO,         LS_READY,               LS_S_R2L,               200     },      // LS_KICK_S
00180         {"StfKickBkFwd",BOTH_A7_KICK_BF,        Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_NO,         LS_READY,               LS_S_R2L,               200     },      // LS_KICK_BF
00181         {"StfKickSplit",BOTH_A7_KICK_RL,        Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_NO,         LS_READY,               LS_S_R2L,               200     },      // LS_KICK_RL
00182         {"StfKickFwdAir",BOTH_A7_KICK_F_AIR,Q_R,        Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_KICK_F_AIR
00183         {"StfKickBackAir",BOTH_A7_KICK_B_AIR,Q_R,       Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_KICK_B_AIR
00184         {"StfKickRightAir",BOTH_A7_KICK_R_AIR,Q_R,      Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_KICK_R_AIR
00185         {"StfKickLeftAir",BOTH_A7_KICK_L_AIR,Q_R,       Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_KICK_L_AIR
00186         {"StabDown",    BOTH_STABDOWN,          Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_STABDOWN
00187         {"StabDownStf", BOTH_STABDOWN_STAFF,Q_R,        Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_STABDOWN_STAFF
00188         {"StabDownDual",BOTH_STABDOWN_DUAL,     Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_S_R2L,               200     },      // LS_STABDOWN_DUAL
00189         {"dualspinprot",BOTH_A6_SABERPROTECT,Q_R,       Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               500     },      // LS_DUAL_SPIN_PROTECT
00190         {"StfSoulCal",  BOTH_A7_SOULCAL,        Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               500     },      // LS_STAFF_SOULCAL
00191         {"specialfast", BOTH_A1_SPECIAL,        Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               2000},  // LS_A1_SPECIAL
00192         {"specialmed",  BOTH_A2_SPECIAL,        Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               2000},  // LS_A2_SPECIAL
00193         {"specialstr",  BOTH_A3_SPECIAL,        Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               2000},  // LS_A3_SPECIAL
00194         {"upsidedwnatk",BOTH_FLIP_ATTACK7,      Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200},   // LS_UPSIDE_DOWN_ATTACK
00195         {"pullatkstab", BOTH_PULL_IMPALE_STAB,Q_R,      Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200},   // LS_PULL_ATTACK_STAB
00196         {"pullatkswing",BOTH_PULL_IMPALE_SWING,Q_R,     Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200},   // LS_PULL_ATTACK_SWING
00197         {"AloraSpinAtk",BOTH_ALORA_SPIN_SLASH,Q_R,      Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_SPINATTACK_ALORA
00198         {"Dual FB Atk", BOTH_A6_FB,                     Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_DUAL_FB
00199         {"Dual LR Atk", BOTH_A6_LR,                     Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200 },  // LS_DUAL_LR
00200         {"StfHiltBash", BOTH_A7_HILT,           Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_HILT_BASH
00201 
00202         //starts
00203         {"TL2BR St",    BOTH_S1_S1_TL,          Q_R,    Q_TL,   AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_A_TL2BR,             LS_A_TL2BR,             200     },      // LS_S_TL2BR
00204         {"L2R St",              BOTH_S1_S1__L,          Q_R,    Q_L,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_A_L2R,               LS_A_L2R,               200     },      // LS_S_L2R
00205         {"BL2TR St",    BOTH_S1_S1_BL,          Q_R,    Q_BL,   AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_A_BL2TR,             LS_A_BL2TR,             200     },      // LS_S_BL2TR
00206         {"BR2TL St",    BOTH_S1_S1_BR,          Q_R,    Q_BR,   AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_A_BR2TL,             LS_A_BR2TL,             200     },      // LS_S_BR2TL
00207         {"R2L St",              BOTH_S1_S1__R,          Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_A_R2L,               LS_A_R2L,               200     },      // LS_S_R2L
00208         {"TR2BL St",    BOTH_S1_S1_TR,          Q_R,    Q_TR,   AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_A_TR2BL,             LS_A_TR2BL,             200     },      // LS_S_TR2BL
00209         {"T2B St",              BOTH_S1_S1_T_,          Q_R,    Q_T,    AFLAG_ACTIVE,   100,    BLK_TIGHT,      LS_A_T2B,               LS_A_T2B,               200     },      // LS_S_T2B
00210         
00211         //returns
00212         {"TL2BR Ret",   BOTH_R1_BR_S1,          Q_BR,   Q_R,    AFLAG_FINISH,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_R_TL2BR
00213         {"L2R Ret",             BOTH_R1__R_S1,          Q_R,    Q_R,    AFLAG_FINISH,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_R_L2R
00214         {"BL2TR Ret",   BOTH_R1_TR_S1,          Q_TR,   Q_R,    AFLAG_FINISH,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_R_BL2TR
00215         {"BR2TL Ret",   BOTH_R1_TL_S1,          Q_TL,   Q_R,    AFLAG_FINISH,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_R_BR2TL
00216         {"R2L Ret",             BOTH_R1__L_S1,          Q_L,    Q_R,    AFLAG_FINISH,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_R_R2L
00217         {"TR2BL Ret",   BOTH_R1_BL_S1,          Q_BL,   Q_R,    AFLAG_FINISH,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_R_TR2BL
00218         {"T2B Ret",             BOTH_R1_B__S1,          Q_B,    Q_R,    AFLAG_FINISH,   100,    BLK_TIGHT,      LS_READY,               LS_READY,               200     },      // LS_R_T2B
00219 
00220         //Transitions
00221         {"BR2R Trans",  BOTH_T1_BR__R,          Q_BR,   Q_R,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_L2R,               LS_A_R2L,               150     },      //# Fast arc bottom right to right
00222         {"BR2TR Trans", BOTH_T1_BR_TR,          Q_BR,   Q_TR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_TR2BL,             150     },      //# Fast arc bottom right to top right          (use: BOTH_T1_TR_BR)
00223         {"BR2T Trans",  BOTH_T1_BR_T_,          Q_BR,   Q_T,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_T2B,               150     },      //# Fast arc bottom right to top                        (use: BOTH_T1_T__BR)
00224         {"BR2TL Trans", BOTH_T1_BR_TL,          Q_BR,   Q_TL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BR2TL,             LS_A_TL2BR,             150     },      //# Fast weak spin bottom right to top left
00225         {"BR2L Trans",  BOTH_T1_BR__L,          Q_BR,   Q_L,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_R2L,               LS_A_L2R,               150     },      //# Fast weak spin bottom right to left
00226         {"BR2BL Trans", BOTH_T1_BR_BL,          Q_BR,   Q_BL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TR2BL,             LS_A_BL2TR,             150     },      //# Fast weak spin bottom right to bottom left
00227         {"R2BR Trans",  BOTH_T1__R_BR,          Q_R,    Q_BR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TL2BR,             LS_A_BR2TL,             150     },      //# Fast arc right to bottom right                      (use: BOTH_T1_BR__R)
00228         {"R2TR Trans",  BOTH_T1__R_TR,          Q_R,    Q_TR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_TR2BL,             150     },      //# Fast arc right to top right
00229         {"R2T Trans",   BOTH_T1__R_T_,          Q_R,    Q_T,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_T2B,               150     },      //# Fast ar right to top                                (use: BOTH_T1_T___R)
00230         {"R2TL Trans",  BOTH_T1__R_TL,          Q_R,    Q_TL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BR2TL,             LS_A_TL2BR,             150     },      //# Fast arc right to top left
00231         {"R2L Trans",   BOTH_T1__R__L,          Q_R,    Q_L,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_R2L,               LS_A_L2R,               150     },      //# Fast weak spin right to left
00232         {"R2BL Trans",  BOTH_T1__R_BL,          Q_R,    Q_BL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TR2BL,             LS_A_BL2TR,             150     },      //# Fast weak spin right to bottom left
00233         {"TR2BR Trans", BOTH_T1_TR_BR,          Q_TR,   Q_BR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TL2BR,             LS_A_BR2TL,             150     },      //# Fast arc top right to bottom right
00234         {"TR2R Trans",  BOTH_T1_TR__R,          Q_TR,   Q_R,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_L2R,               LS_A_R2L,               150     },      //# Fast arc top right to right                 (use: BOTH_T1__R_TR)
00235         {"TR2T Trans",  BOTH_T1_TR_T_,          Q_TR,   Q_T,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_T2B,               150     },      //# Fast arc top right to top                           (use: BOTH_T1_T__TR)
00236         {"TR2TL Trans", BOTH_T1_TR_TL,          Q_TR,   Q_TL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BR2TL,             LS_A_TL2BR,             150     },      //# Fast arc top right to top left
00237         {"TR2L Trans",  BOTH_T1_TR__L,          Q_TR,   Q_L,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_R2L,               LS_A_L2R,               150     },      //# Fast arc top right to left
00238         {"TR2BL Trans", BOTH_T1_TR_BL,          Q_TR,   Q_BL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TR2BL,             LS_A_BL2TR,             150     },      //# Fast weak spin top right to bottom left
00239         {"T2BR Trans",  BOTH_T1_T__BR,          Q_T,    Q_BR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TL2BR,             LS_A_BR2TL,             150     },      //# Fast arc top to bottom right
00240         {"T2R Trans",   BOTH_T1_T___R,          Q_T,    Q_R,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_L2R,               LS_A_R2L,               150     },      //# Fast arc top to right
00241         {"T2TR Trans",  BOTH_T1_T__TR,          Q_T,    Q_TR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_TR2BL,             150     },      //# Fast arc top to top right
00242         {"T2TL Trans",  BOTH_T1_T__TL,          Q_T,    Q_TL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BR2TL,             LS_A_TL2BR,             150     },      //# Fast arc top to top left
00243         {"T2L Trans",   BOTH_T1_T___L,          Q_T,    Q_L,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_R2L,               LS_A_L2R,               150     },      //# Fast arc top to left
00244         {"T2BL Trans",  BOTH_T1_T__BL,          Q_T,    Q_BL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TR2BL,             LS_A_BL2TR,             150     },      //# Fast arc top to bottom left
00245         {"TL2BR Trans", BOTH_T1_TL_BR,          Q_TL,   Q_BR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TL2BR,             LS_A_BR2TL,             150     },      //# Fast weak spin top left to bottom right
00246         {"TL2R Trans",  BOTH_T1_TL__R,          Q_TL,   Q_R,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_L2R,               LS_A_R2L,               150     },      //# Fast arc top left to right                  (use: BOTH_T1__R_TL)
00247         {"TL2TR Trans", BOTH_T1_TL_TR,          Q_TL,   Q_TR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_TR2BL,             150     },      //# Fast arc top left to top right                      (use: BOTH_T1_TR_TL)
00248         {"TL2T Trans",  BOTH_T1_TL_T_,          Q_TL,   Q_T,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_T2B,               150     },      //# Fast arc top left to top                            (use: BOTH_T1_T__TL)
00249         {"TL2L Trans",  BOTH_T1_TL__L,          Q_TL,   Q_L,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_R2L,               LS_A_L2R,               150     },      //# Fast arc top left to left                           (use: BOTH_T1__L_TL)
00250         {"TL2BL Trans", BOTH_T1_TL_BL,          Q_TL,   Q_BL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TR2BL,             LS_A_BL2TR,             150     },      //# Fast arc top left to bottom left
00251         {"L2BR Trans",  BOTH_T1__L_BR,          Q_L,    Q_BR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TL2BR,             LS_A_BR2TL,             150     },      //# Fast weak spin left to bottom right
00252         {"L2R Trans",   BOTH_T1__L__R,          Q_L,    Q_R,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_L2R,               LS_A_R2L,               150     },      //# Fast weak spin left to right
00253         {"L2TR Trans",  BOTH_T1__L_TR,          Q_L,    Q_TR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_TR2BL,             150     },      //# Fast arc left to top right                  (use: BOTH_T1_TR__L)
00254         {"L2T Trans",   BOTH_T1__L_T_,          Q_L,    Q_T,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_T2B,               150     },      //# Fast arc left to top                                (use: BOTH_T1_T___L)
00255         {"L2TL Trans",  BOTH_T1__L_TL,          Q_L,    Q_TL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BR2TL,             LS_A_TL2BR,             150     },      //# Fast arc left to top left
00256         {"L2BL Trans",  BOTH_T1__L_BL,          Q_L,    Q_BL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TR2BL,             LS_A_BL2TR,             150     },      //# Fast arc left to bottom left                        (use: BOTH_T1_BL__L)
00257         {"BL2BR Trans", BOTH_T1_BL_BR,          Q_BL,   Q_BR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TL2BR,             LS_A_BR2TL,             150     },      //# Fast weak spin bottom left to bottom right
00258         {"BL2R Trans",  BOTH_T1_BL__R,          Q_BL,   Q_R,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_L2R,               LS_A_R2L,               150     },      //# Fast weak spin bottom left to right
00259         {"BL2TR Trans", BOTH_T1_BL_TR,          Q_BL,   Q_TR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_TR2BL,             150     },      //# Fast weak spin bottom left to top right
00260         {"BL2T Trans",  BOTH_T1_BL_T_,          Q_BL,   Q_T,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_A_T2B,               150     },      //# Fast arc bottom left to top                 (use: BOTH_T1_T__BL)
00261         {"BL2TL Trans", BOTH_T1_BL_TL,          Q_BL,   Q_TL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BR2TL,             LS_A_TL2BR,             150     },      //# Fast arc bottom left to top left            (use: BOTH_T1_TL_BL)
00262         {"BL2L Trans",  BOTH_T1_BL__L,          Q_BL,   Q_L,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_R2L,               LS_A_L2R,               150     },      //# Fast arc bottom left to left
00263 
00264         //Bounces
00265         {"Bounce BR",   BOTH_B1_BR___,          Q_BR,   Q_BR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TL2BR,             LS_T1_BR_TR,    150     },      
00266         {"Bounce R",    BOTH_B1__R___,          Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_L2R,               LS_T1__R__L,    150     },      
00267         {"Bounce TR",   BOTH_B1_TR___,          Q_TR,   Q_TR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_T1_TR_TL,    150     },      
00268         {"Bounce T",    BOTH_B1_T____,          Q_T,    Q_T,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_T1_T__BL,    150     },      
00269         {"Bounce TL",   BOTH_B1_TL___,          Q_TL,   Q_TL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BR2TL,             LS_T1_TL_TR,    150     },      
00270         {"Bounce L",    BOTH_B1__L___,          Q_L,    Q_L,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_R2L,               LS_T1__L__R,    150     },      
00271         {"Bounce BL",   BOTH_B1_BL___,          Q_BL,   Q_BL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TR2BL,             LS_T1_BL_TR,    150     },      
00272 
00273         //Deflected attacks (like bounces, but slide off enemy saber, not straight back)
00274         {"Deflect BR",  BOTH_D1_BR___,          Q_BR,   Q_BR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TL2BR,             LS_T1_BR_TR,    150     },      
00275         {"Deflect R",   BOTH_D1__R___,          Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_L2R,               LS_T1__R__L,    150     },      
00276         {"Deflect TR",  BOTH_D1_TR___,          Q_TR,   Q_TR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_T1_TR_TL,    150     },      
00277         {"Deflect T",   BOTH_B1_T____,          Q_T,    Q_T,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_T1_T__BL,    150     },      
00278         {"Deflect TL",  BOTH_D1_TL___,          Q_TL,   Q_TL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BR2TL,             LS_T1_TL_TR,    150     },      
00279         {"Deflect L",   BOTH_D1__L___,          Q_L,    Q_L,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_R2L,               LS_T1__L__R,    150     },      
00280         {"Deflect BL",  BOTH_D1_BL___,          Q_BL,   Q_BL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_R_TR2BL,             LS_T1_BL_TR,    150     },      
00281         {"Deflect B",   BOTH_D1_B____,          Q_B,    Q_B,    AFLAG_ACTIVE,   100,    BLK_NO, LS_R_BL2TR,             LS_T1_T__BL,    150     },      
00282 
00283         //Reflected attacks
00284         {"Reflected BR",BOTH_V1_BR_S1,          Q_BR,   Q_BR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_READY,               LS_READY,       150     },//    LS_V1_BR
00285         {"Reflected R", BOTH_V1__R_S1,          Q_R,    Q_R,    AFLAG_ACTIVE,   100,    BLK_NO, LS_READY,               LS_READY,       150     },//    LS_V1__R
00286         {"Reflected TR",BOTH_V1_TR_S1,          Q_TR,   Q_TR,   AFLAG_ACTIVE,   100,    BLK_NO, LS_READY,               LS_READY,       150     },//    LS_V1_TR
00287         {"Reflected T", BOTH_V1_T__S1,          Q_T,    Q_T,    AFLAG_ACTIVE,   100,    BLK_NO, LS_READY,               LS_READY,       150     },//    LS_V1_T_
00288         {"Reflected TL",BOTH_V1_TL_S1,          Q_TL,   Q_TL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_READY,               LS_READY,       150     },//    LS_V1_TL
00289         {"Reflected L", BOTH_V1__L_S1,          Q_L,    Q_L,    AFLAG_ACTIVE,   100,    BLK_NO, LS_READY,               LS_READY,       150     },//    LS_V1__L
00290         {"Reflected BL",BOTH_V1_BL_S1,          Q_BL,   Q_BL,   AFLAG_ACTIVE,   100,    BLK_NO, LS_READY,               LS_READY,       150     },//    LS_V1_BL
00291         {"Reflected B", BOTH_V1_B__S1,          Q_B,    Q_B,    AFLAG_ACTIVE,   100,    BLK_NO, LS_READY,               LS_READY,       150     },//    LS_V1_B_
00292 
00293         // Broken parries
00294         {"BParry Top",  BOTH_H1_S1_T_,          Q_T,    Q_B,    AFLAG_ACTIVE,   50,             BLK_NO, LS_READY,               LS_READY,               150     },      // LS_PARRY_UP,
00295         {"BParry UR",   BOTH_H1_S1_TR,          Q_TR,   Q_BL,   AFLAG_ACTIVE,   50,             BLK_NO, LS_READY,               LS_READY,               150     },      // LS_PARRY_UR,
00296         {"BParry UL",   BOTH_H1_S1_TL,          Q_TL,   Q_BR,   AFLAG_ACTIVE,   50,             BLK_NO, LS_READY,               LS_READY,               150     },      // LS_PARRY_UL,
00297         {"BParry LR",   BOTH_H1_S1_BL,          Q_BL,   Q_TR,   AFLAG_ACTIVE,   50,             BLK_NO, LS_READY,               LS_READY,               150     },      // LS_PARRY_LR,
00298         {"BParry Bot",  BOTH_H1_S1_B_,          Q_B,    Q_T,    AFLAG_ACTIVE,   50,             BLK_NO, LS_READY,               LS_READY,               150     },      // LS_PARRY_LL
00299         {"BParry LL",   BOTH_H1_S1_BR,          Q_BR,   Q_TL,   AFLAG_ACTIVE,   50,             BLK_NO, LS_READY,               LS_READY,               150     },      // LS_PARRY_LL
00300 
00301         // Knockaways
00302         {"Knock Top",   BOTH_K1_S1_T_,          Q_R,    Q_T,    AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_BL2TR,             LS_T1_T__BR,            150     },      // LS_PARRY_UP,
00303         {"Knock UR",    BOTH_K1_S1_TR,          Q_R,    Q_TR,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_BL2TR,             LS_T1_TR__R,            150     },      // LS_PARRY_UR,
00304         {"Knock UL",    BOTH_K1_S1_TL,          Q_R,    Q_TL,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_BR2TL,             LS_T1_TL__L,            150     },      // LS_PARRY_UL,
00305         {"Knock LR",    BOTH_K1_S1_BL,          Q_R,    Q_BL,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_TL2BR,             LS_T1_BL_TL,            150     },      // LS_PARRY_LR,
00306         {"Knock LL",    BOTH_K1_S1_BR,          Q_R,    Q_BR,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_TR2BL,             LS_T1_BR_TR,            150     },      // LS_PARRY_LL
00307 
00308         // Parry
00309         {"Parry Top",   BOTH_P1_S1_T_,          Q_R,    Q_T,    AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_BL2TR,             LS_A_T2B,               150     },      // LS_PARRY_UP,
00310         {"Parry UR",    BOTH_P1_S1_TR,          Q_R,    Q_TL,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_BL2TR,             LS_A_TR2BL,             150     },      // LS_PARRY_UR,
00311         {"Parry UL",    BOTH_P1_S1_TL,          Q_R,    Q_TR,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_BR2TL,             LS_A_TL2BR,             150     },      // LS_PARRY_UL,
00312         {"Parry LR",    BOTH_P1_S1_BL,          Q_R,    Q_BR,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_TL2BR,             LS_A_BR2TL,             150     },      // LS_PARRY_LR,
00313         {"Parry LL",    BOTH_P1_S1_BR,          Q_R,    Q_BL,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_TR2BL,             LS_A_BL2TR,             150     },      // LS_PARRY_LL
00314 
00315         // Reflecting a missile
00316         {"Reflect Top", BOTH_P1_S1_T_,          Q_R,    Q_T,    AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_BL2TR,             LS_A_T2B,               300     },      // LS_PARRY_UP,
00317         {"Reflect UR",  BOTH_P1_S1_TL,          Q_R,    Q_TR,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_BR2TL,             LS_A_TL2BR,             300     },      // LS_PARRY_UR,
00318         {"Reflect UL",  BOTH_P1_S1_TR,          Q_R,    Q_TL,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_BL2TR,             LS_A_TR2BL,             300     },      // LS_PARRY_UL,
00319         {"Reflect LR",  BOTH_P1_S1_BR,          Q_R,    Q_BL,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_TR2BL,             LS_A_BL2TR,             300     },      // LS_PARRY_LR
00320         {"Reflect LL",  BOTH_P1_S1_BL,          Q_R,    Q_BR,   AFLAG_ACTIVE,   50,             BLK_WIDE,       LS_R_TL2BR,             LS_A_BR2TL,             300     },      // LS_PARRY_LL,
00321 };
00322 
00323 
00324 int transitionMove[Q_NUM_QUADS][Q_NUM_QUADS] = 
00325 {
00326         LS_NONE,        //Can't transition to same pos!
00327         LS_T1_BR__R,//40
00328         LS_T1_BR_TR,
00329         LS_T1_BR_T_,
00330         LS_T1_BR_TL,
00331         LS_T1_BR__L,
00332         LS_T1_BR_BL,
00333         LS_NONE,        //No transitions to bottom, and no anims start there, so shouldn't need any
00334         LS_T1__R_BR,//46
00335         LS_NONE,        //Can't transition to same pos!
00336         LS_T1__R_TR,
00337         LS_T1__R_T_,
00338         LS_T1__R_TL,
00339         LS_T1__R__L,
00340         LS_T1__R_BL,
00341         LS_NONE,        //No transitions to bottom, and no anims start there, so shouldn't need any
00342         LS_T1_TR_BR,//52
00343         LS_T1_TR__R,
00344         LS_NONE,        //Can't transition to same pos!
00345         LS_T1_TR_T_,
00346         LS_T1_TR_TL,
00347         LS_T1_TR__L,
00348         LS_T1_TR_BL,
00349         LS_NONE,        //No transitions to bottom, and no anims start there, so shouldn't need any
00350         LS_T1_T__BR,//58
00351         LS_T1_T___R,
00352         LS_T1_T__TR,
00353         LS_NONE,        //Can't transition to same pos!
00354         LS_T1_T__TL,
00355         LS_T1_T___L,
00356         LS_T1_T__BL,
00357         LS_NONE,        //No transitions to bottom, and no anims start there, so shouldn't need any
00358         LS_T1_TL_BR,//64
00359         LS_T1_TL__R,
00360         LS_T1_TL_TR,
00361         LS_T1_TL_T_,
00362         LS_NONE,        //Can't transition to same pos!
00363         LS_T1_TL__L,
00364         LS_T1_TL_BL,
00365         LS_NONE,        //No transitions to bottom, and no anims start there, so shouldn't need any
00366         LS_T1__L_BR,//70
00367         LS_T1__L__R,
00368         LS_T1__L_TR,
00369         LS_T1__L_T_,
00370         LS_T1__L_TL,
00371         LS_NONE,        //Can't transition to same pos!
00372         LS_T1__L_BL,
00373         LS_NONE,        //No transitions to bottom, and no anims start there, so shouldn't need any
00374         LS_T1_BL_BR,//76
00375         LS_T1_BL__R,
00376         LS_T1_BL_TR,
00377         LS_T1_BL_T_,
00378         LS_T1_BL_TL,
00379         LS_T1_BL__L,
00380         LS_NONE,        //Can't transition to same pos!
00381         LS_NONE,        //No transitions to bottom, and no anims start there, so shouldn't need any
00382         LS_T1_BL_BR,//NOTE: there are no transitions from bottom, so re-use the bottom right transitions
00383         LS_T1_BR__R,
00384         LS_T1_BR_TR,
00385         LS_T1_BR_T_,
00386         LS_T1_BR_TL,
00387         LS_T1_BR__L,
00388         LS_T1_BR_BL,
00389         LS_NONE         //No transitions to bottom, and no anims start there, so shouldn't need any
00390 };
00391 
00392 saberMoveName_t PM_AttackMoveForQuad( int quad )
00393 {
00394         switch ( quad )
00395         {
00396         case Q_B:
00397         case Q_BR:
00398                 return LS_A_BR2TL;
00399                 break;
00400         case Q_R:
00401                 return LS_A_R2L;
00402                 break;
00403         case Q_TR:
00404                 return LS_A_TR2BL;
00405                 break;
00406         case Q_T:
00407                 return LS_A_T2B;
00408                 break;
00409         case Q_TL:
00410                 return LS_A_TL2BR;
00411                 break;
00412         case Q_L:
00413                 return LS_A_L2R;
00414                 break;
00415         case Q_BL:
00416                 return LS_A_BL2TR;
00417                 break;
00418         }
00419         return LS_NONE;
00420 }
00421 
00422 qboolean PM_SaberKataDone(int curmove, int newmove);
00423 
00424 int PM_SaberAnimTransitionAnim( int curmove, int newmove )
00425 {
00426         int retmove = newmove;
00427         if ( curmove == LS_READY )
00428         {//just standing there
00429                 switch ( newmove )
00430                 {
00431                 case LS_A_TL2BR:
00432                 case LS_A_L2R:
00433                 case LS_A_BL2TR:
00434                 case LS_A_BR2TL:
00435                 case LS_A_R2L:
00436                 case LS_A_TR2BL:
00437                 case LS_A_T2B:
00438                         //transition is the start
00439                         retmove = LS_S_TL2BR + (newmove-LS_A_TL2BR);
00440                         break;
00441                 }
00442         }
00443         else
00444         {
00445                 switch ( newmove )
00446                 {
00447                 //transitioning to ready pose
00448                 case LS_READY:
00449                         switch ( curmove )
00450                         {
00451                         //transitioning from an attack
00452                         case LS_A_TL2BR:
00453                         case LS_A_L2R:
00454                         case LS_A_BL2TR:
00455                         case LS_A_BR2TL:
00456                         case LS_A_R2L:
00457                         case LS_A_TR2BL:
00458                         case LS_A_T2B:
00459                                 //transition is the return
00460                                 retmove = LS_R_TL2BR + (newmove-LS_A_TL2BR);
00461                                 break;
00462                         }
00463                         break;
00464                 //transitioning to an attack
00465                 case LS_A_TL2BR:
00466                 case LS_A_L2R:
00467                 case LS_A_BL2TR:
00468                 case LS_A_BR2TL:
00469                 case LS_A_R2L:
00470                 case LS_A_TR2BL:
00471                 case LS_A_T2B:
00472                         if ( newmove == curmove )
00473                         {
00474                                 //going into an attack
00475                                 if ( PM_SaberKataDone( curmove, newmove ) )
00476                                 {//done with this kata, must return to ready before attack again
00477                                         retmove = LS_R_TL2BR + (newmove-LS_A_TL2BR);
00478                                 }
00479                                 else
00480                                 {//okay to chain to another attack
00481                                         retmove = transitionMove[saberMoveData[curmove].endQuad][saberMoveData[newmove].startQuad];
00482                                 }
00483                         }
00484                         else if ( saberMoveData[curmove].endQuad == saberMoveData[newmove].startQuad )
00485                         {//new move starts from same