| 2082 | */ |
| 2083 | |
| 2084 | void PM_SetTorsoAnimTimer( gentity_t *ent, int *torsoAnimTimer, int time ) |
| 2085 | { |
| 2086 | *torsoAnimTimer = time; |
| 2087 | |
| 2088 | if ( *torsoAnimTimer < 0 && time != -1 ) |
| 2089 | {//Cap timer to 0 if was counting down, but let it be -1 if that was intentional |
| 2090 | *torsoAnimTimer = 0; |
| 2091 | } |
| 2092 | |
| 2093 | if ( !*torsoAnimTimer && ent && Q3_TaskIDPending( ent, TID_ANIM_UPPER ) ) |
| 2094 | {//Waiting for torsoAnimTimer to complete, and it just got set to zero |
| 2095 | if ( !Q3_TaskIDPending( ent, TID_ANIM_BOTH) ) |
| 2096 | {//Not waiting for bottom |
| 2097 | Q3_TaskIDComplete( ent, TID_ANIM_UPPER ); |
| 2098 | } |
| 2099 | else |
| 2100 | {//Waiting for both to finish before complete |
| 2101 | Q3_TaskIDClear( &ent->taskID[TID_ANIM_UPPER] );//Top is done, regardless |
| 2102 | if ( !Q3_TaskIDPending( ent, TID_ANIM_LOWER) ) |
| 2103 | {//lower is done and we're done |
| 2104 | Q3_TaskIDComplete( ent, TID_ANIM_BOTH ); |
| 2105 | } |
| 2106 | } |
| 2107 | } |
| 2108 | } |
| 2109 | |
| 2110 | extern qboolean PM_SpinningSaberAnim( int anim ); |
| 2111 | extern float saberAnimSpeedMod[NUM_FORCE_POWER_LEVELS]; |
no test coverage detected