mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-10 15:21:44 +00:00
HC reload
This commit is contained in:
parent
5634cc1b9c
commit
4956cd281e
2 changed files with 12 additions and 8 deletions
|
@ -811,6 +811,10 @@ void CG_RegisterWeapon( int weaponNum ) {
|
|||
weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/handcannon/hcfire.wav", qfalse );
|
||||
weaponInfo->ejectBrassFunc = CG_ShotgunEjectBrass;
|
||||
cgs.media.bulletExplosionShader = trap_R_RegisterShader( "bulletExplosion" );
|
||||
Com_sprintf( filename, sizeof(filename), "models/weapons2/handcannon/animation.cfg" );
|
||||
if ( !CG_ParseWeaponAnimFile(filename, weaponInfo) ) {
|
||||
Com_Printf("Failed to load weapon animation file %s\n", filename);
|
||||
}
|
||||
break;
|
||||
|
||||
case WP_M3:
|
||||
|
@ -1499,7 +1503,7 @@ void CG_AddViewWeapon( playerState_t *ps ) {
|
|||
//if ( ps->weapon != WP_PISTOL && ps->weapon != WP_M3)
|
||||
//{
|
||||
// map torso animations to weapon animations
|
||||
if ( cg_gun_frame.integer || ps->weapon == WP_PISTOL || ps->weapon == WP_M3) {
|
||||
if ( cg_gun_frame.integer || ps->weapon == WP_PISTOL || ps->weapon == WP_M3 || ps->weapon == WP_HANDCANNON) {
|
||||
// development tool
|
||||
hand.frame = hand.oldframe = cg_gun_frame.integer;
|
||||
hand.backlerp = 0;
|
||||
|
|
|
@ -1797,7 +1797,7 @@ static void PM_BeginWeaponChange( int weapon ) {
|
|||
}
|
||||
|
||||
//Elder: temp hack
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3)
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3 || pm->ps->weapon == WP_HANDCANNON)
|
||||
PM_StartWeaponAnim(WP_ANIM_DISARM);
|
||||
|
||||
PM_StartTorsoAnim( TORSO_DROP );
|
||||
|
@ -1870,7 +1870,7 @@ static void PM_FinishWeaponChange( void ) {
|
|||
}
|
||||
|
||||
//Elder: temp hack
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3)
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3 || pm->ps->weapon == WP_HANDCANNON)
|
||||
PM_StartWeaponAnim(WP_ANIM_ACTIVATE);
|
||||
|
||||
PM_StartTorsoAnim( TORSO_RAISE );
|
||||
|
@ -1894,7 +1894,7 @@ static void PM_TorsoAnimation( void ) {
|
|||
// QUARANTINE - Weapon Animation
|
||||
// Should always draw the weapon when it is just ready
|
||||
//Elder: temp hack
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3)
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3 || pm->ps->weapon == WP_HANDCANNON)
|
||||
PM_ContinueWeaponAnim( WP_ANIM_IDLE );
|
||||
// PM_ContinueWeaponAnim( WP_ANIM_READY );
|
||||
|
||||
|
@ -2051,7 +2051,7 @@ static void PM_Weapon( void ) {
|
|||
{
|
||||
//Elder: added
|
||||
if (pm->ps->weaponstate == WEAPON_READY &&
|
||||
(pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3))
|
||||
(pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3 || pm->ps->weapon == WP_HANDCANNON))
|
||||
PM_ContinueWeaponAnim(WP_ANIM_IDLE);
|
||||
}
|
||||
}
|
||||
|
@ -2093,7 +2093,7 @@ static void PM_Weapon( void ) {
|
|||
// QUARANTINE - Weapon Animation
|
||||
// Should always draw the weapon when it is just ready
|
||||
// PM_StartWeaponAnim( WP_ANIM_READY );
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3)
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3 || pm->ps->weapon == WP_HANDCANNON)
|
||||
PM_StartWeaponAnim( WP_ANIM_IDLE );
|
||||
return;
|
||||
}
|
||||
|
@ -2178,7 +2178,7 @@ static void PM_Weapon( void ) {
|
|||
// QUARANTINE - Weapon animations
|
||||
// This should change pm->ps->generic1 so we can animate
|
||||
// Elder: don't repeat if on semi-auto
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3)
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3 || pm->ps->weapon == WP_HANDCANNON)
|
||||
PM_StartWeaponAnim( WP_ANIM_FIRE );
|
||||
}
|
||||
}
|
||||
|
@ -2742,7 +2742,7 @@ void PmoveSingle (pmove_t *pmove) {
|
|||
|
||||
//weapon animations(rq3 specific)
|
||||
//Elder: hack to avoid messing up fast-reloads
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3)
|
||||
if (pm->ps->weapon == WP_PISTOL || pm->ps->weapon == WP_M3 || pm->ps->weapon == WP_HANDCANNON)
|
||||
PM_WeaponAnimation();
|
||||
|
||||
// torso animation
|
||||
|
|
Loading…
Reference in a new issue