void CTEST::WeaponIdle( void ) { UpdateSpot( ); ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); if (m_flTimeWeaponIdle > gpGlobals->time) return; int iAnim; switch ( RANDOM_LONG( 0, 1 ) ) { case 0: iAnim = TEST_LONGIDLE; break; default: case 1: iAnim = TEST_IDLE1; break; } SendWeaponAnim( iAnim ); m_flTimeWeaponIdle = gpGlobals->time + RANDOM_FLOAT ( 10, 15 );// how long till we do this again. }
void CUSP::WeaponIdle() { ResetEmptySound(); m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES ); if( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() ) { return; } if( m_pPlayer->HasShield() ) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + USP_IDLE_INTERVAL; if( FBitSet( m_fWeaponState, WEAPONSTATE_SHIELD_DRAWN ) ) { SendWeaponAnim( GUN_IDLE1, UseDecrement() ); } } else if( m_iClip ) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + USP_IDLE_INTERVAL_NOSHIELD; SendWeaponAnim( USP_IDLE_UNSIL * !FBitSet( m_fWeaponState, WEAPONSTATE_USP_SILENCED ), UseDecrement() ); } }
void CGlock::WeaponIdle( void ) { ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES ); if ( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() ) return; // only idle if the slid isn't back if (m_iClip != 0) { int iAnim; float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0.0, 1.0 ); if (flRand <= 0.3 + 0 * 0.75) { iAnim = GLOCK_IDLE3; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 49.0 / 16; } else if (flRand <= 0.6 + 0 * 0.875) { iAnim = GLOCK_IDLE1; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60.0 / 16.0; } else { iAnim = GLOCK_IDLE2; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 40.0 / 16.0; } SendWeaponAnim( iAnim, 1 ); } }
void CEgon::WeaponIdle( void ) { ResetEmptySound( ); if ( m_flTimeWeaponIdle > gpGlobals->time ) return; if ( m_fireState != FIRE_OFF ) EndAttack(); int iAnim; float flRand = RANDOM_FLOAT(0,1); if ( flRand <= 0.5 ) { iAnim = EGON_IDLE1; m_flTimeWeaponIdle = gpGlobals->time + RANDOM_FLOAT(10,15); } else { iAnim = EGON_FIDGET1; m_flTimeWeaponIdle = gpGlobals->time + 3; } SendWeaponAnim( iAnim ); m_deployed = TRUE; }
void CFiveSeven::WeaponIdle( void ) { ResetEmptySound(); m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES ); if( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() ) { return; } if( m_pPlayer->HasShield() ) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0; if( FBitSet( m_iWeaponState, WPNSTATE_SHIELD_DRAWN ) ) { SendWeaponAnim( SHIELDGUN_DRAWN_IDLE, UseDecrement() != FALSE ); } } else if( m_iClip ) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0625; SendWeaponAnim( FIVESEVEN_IDLE, UseDecrement() != FALSE ); } }
/* <2b9c2a> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:318 */ void CUSP::__MAKE_VHOOK(WeaponIdle)(void) { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES); if (m_flTimeWeaponIdle > 0) { return; } if (m_pPlayer->HasShield()) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0; if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN) { SendWeaponAnim(USP_DRAW, UseDecrement()); } } else if (m_iClip) { int iAnim = (~m_iWeaponState & WPNSTATE_USP_SILENCED) ? USP_UNSIL_IDLE: USP_IDLE; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60.0; SendWeaponAnim(iAnim, UseDecrement()); } }
void CM3::WeaponIdle(void) { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_5DEGREES); if (m_flPumpTime && m_flPumpTime < UTIL_WeaponTimeBase()) m_flPumpTime = 0; if (m_flTimeWeaponIdle < UTIL_WeaponTimeBase()) { if (m_iClip == 0 && m_fInSpecialReload == 0 && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]) { Reload(); } else if (m_fInSpecialReload != 0) { if (m_iClip != M3_MAX_CLIP && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]) { Reload(); } else { SendWeaponAnim(M3_PUMP, UseDecrement() != FALSE); m_fInSpecialReload = 0; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5; } } else SendWeaponAnim(M3_IDLE, UseDecrement() != FALSE); } }
void CMP5::WeaponIdle( void ) { ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase()) return; if (m_iClip != 0) { if ( m_fDefaultAnim == SILENCER_OFF_FULLAUTO || m_fDefaultAnim == SILENCER_OFF_SEMI ) { if (RANDOM_LONG(0,1)) SendWeaponAnim( A2_IDLE1 ); else SendWeaponAnim( A2_IDLE2 ); } else { if (RANDOM_LONG(0,1)) SendWeaponAnim( SD2_IDLE1 ); else SendWeaponAnim( SD2_IDLE2 ); } m_flTimeWeaponIdle = UTIL_SharedRandomFloat(m_pPlayer->random_seed, 10, 15); } }
void AvHBasePlayerWeapon::WeaponIdle(void) { //#ifdef AVH_CLIENT // char sz[ 128 ]; // sprintf(sz, "during idle, clip is %d\n", this->m_iClip); // gEngfuncs.pfnCenterPrint( sz ); // // //gEngfuncs.Con_Printf("during idle, clip is %d\n", sz); //#endif if(this->mAttackButtonDownLastFrame) { this->PlaybackEvent(this->mEndEvent); this->mAttackButtonDownLastFrame = false; } ResetEmptySound(); this->m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); if(this->m_flTimeWeaponIdle <= UTIL_WeaponTimeBase()) { this->SendWeaponAnim(this->GetIdleAnimation()); this->m_pPlayer->SetAnimation(PLAYER_IDLE); this->SetNextIdle(); } }
void CAK74::WeaponIdle( void ) { /* if (!FStringNull (v_model) ) { ALERT (at_console, "v_model is %s \n",STRING( v_model)); ALERT (at_console, "p_model is %s \n",STRING( p_model)); ALERT (at_console, "w_model is %s \n",STRING( w_model)); } */ ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); if ( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() ) return; int iAnim; switch ( RANDOM_LONG( 0, 1 ) ) { case 0: iAnim = AK_NMC_IDLE1; break; default: case 1: iAnim = AK_NMC_IDLE2; break; } SendWeaponAnim( iAnim ); m_flTimeWeaponIdle = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); // how long till we do this again. }
void CGlock::WeaponIdle( void ) { ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES ); if (m_flTimeWeaponIdle > gpGlobals->time) return; // only idle if the slid isn't back if (m_iClip != 0) { int iAnim; float flRand = RANDOM_FLOAT(0, 1); if (flRand <= 0.3 + 0 * 0.75) { iAnim = GLOCK_IDLE3; m_flTimeWeaponIdle = gpGlobals->time + 49.0 / 16; } else if (flRand <= 0.6 + 0 * 0.875) { iAnim = GLOCK_IDLE1; m_flTimeWeaponIdle = gpGlobals->time + 60.0 / 16.0; } else { iAnim = GLOCK_IDLE2; m_flTimeWeaponIdle = gpGlobals->time + 40.0 / 16.0; } SendWeaponAnim( iAnim ); } }
void CEgon::WeaponIdle( void ) { ResetEmptySound( ); if ( m_flTimeWeaponIdle > gpGlobals->time ) return; if ( m_fireState != FIRE_OFF ) EndAttack(); int iAnim; float flRand = RANDOM_FLOAT(0,1); if ( flRand <= 0.5 ) { iAnim = EGON_IDLE1; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); } else { iAnim = EGON_FIDGET1; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3; } SendWeaponAnim( iAnim ); m_deployed = TRUE; }
void CUSP::WeaponIdle(void) { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES); if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase()) return; if (m_pPlayer->HasShield()) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20; if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN) SendWeaponAnim(USP_DRAW, UseDecrement() != FALSE); return; } if (m_iClip) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60; if (m_iWeaponState & WPNSTATE_USP_SILENCED) SendWeaponAnim(USP_IDLE, UseDecrement() != FALSE); else SendWeaponAnim(USP_UNSIL_IDLE, UseDecrement() != FALSE); } }
void CMP5::WeaponIdle( void ) { ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); if ( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() ) return; int iAnim; switch ( RANDOM_LONG( 0, 1 ) ) { case 0: iAnim = MP5_LONGIDLE; break; default: case 1: iAnim = MP5_IDLE1; break; } SendWeaponAnim( iAnim ); m_flTimeWeaponIdle = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); // how long till we do this again. }
void CM249::WeaponIdle( void ) { if (m_flTimeWeaponIdle < UTIL_WeaponTimeBase() ) { if ( m_fInSpecialReload ) { UpdateClip(); m_fInSpecialReload = 0; SendWeaponAnim( M249_RELOAD2 , UseDecrement() ? 1 : 0, pev->body ); m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 111.0 / 45.0; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 111.0 / 45.0; } else { ResetEmptySound( ); UpdateClip(); int iAnim; float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 ); if (flRand <= 0.8) { iAnim = M249_SLOWIDLE; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + (45.0/9.0); } else { iAnim = M249_IDLE1; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + (74.0/12.0);// * RANDOM_LONG(2, 5); } SendWeaponAnim( iAnim , UseDecrement() ? 1 : 0, pev->body ); } } }
/* <290f2e> ../cstrike/dlls/wpn_shared/wpn_p228.cpp:261 */ void CP228::__MAKE_VHOOK(WeaponIdle)() { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES); if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase()) { return; } if (m_pPlayer->HasShield()) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0f; if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN) { SendWeaponAnim(P228_SHIELD_IDLE_UP, UseDecrement() != FALSE); } } else if (m_iClip) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0625f; SendWeaponAnim(P228_IDLE, UseDecrement() != FALSE); } }
void CM16::WeaponIdle( void ) { ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); if (m_flTimeWeaponIdle > gpGlobals->time) return; int iAnim; switch ( RANDOM_LONG( 0, 2 ) ) { case 0: case 1: iAnim = M16_LONGIDLE; m_flTimeWeaponIdle = gpGlobals->time + 70 / 14.0; break; default: case 2: iAnim = M16_IDLE1; m_flTimeWeaponIdle = gpGlobals->time + 62 / 8.0; break; } SendWeaponAnim( iAnim ); // m_flTimeWeaponIdle = gpGlobals->time + RANDOM_FLOAT ( 10, 15 );// how long till we do this again. }
void CShotgun::WeaponIdle( void ) { ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); if (m_flPumpTime && m_flPumpTime < gpGlobals->time) { // play pumping sound EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/scock1.wav", 1, ATTN_NORM, 0, 95 + RANDOM_LONG(0,0x1f)); m_flPumpTime = 0; } if (m_flTimeWeaponIdle < gpGlobals->time) { if (m_iClip == 0 && m_fInReload == 0 && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]) { Reload( ); } else if (m_fInReload != 0) { if (m_iClip != 8 && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]) { Reload( ); } else { // reload debounce has timed out SendWeaponAnim( SHOTGUN_PUMP ); // play cocking sound EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/scock1.wav", 1, ATTN_NORM, 0, 95 + RANDOM_LONG(0,0x1f)); m_fInReload = 0; m_flTimeWeaponIdle = gpGlobals->time + 1.5; } } else { int iAnim; float flRand = RANDOM_FLOAT(0, 1); if (flRand <= 0.8) { iAnim = SHOTGUN_IDLE_DEEP; m_flTimeWeaponIdle = gpGlobals->time + (60.0/12.0);// * RANDOM_LONG(2, 5); } else /*if (flRand <= 0.95)*/ { iAnim = SHOTGUN_IDLE; m_flTimeWeaponIdle = gpGlobals->time + (20.0/9.0); } /* else { iAnim = SHOTGUN_IDLE4; m_flTimeWeaponIdle = gpGlobals->time + (20.0/9.0); } */ SendWeaponAnim( iAnim ); } } }
void CIngram::WeaponIdle( void ) { ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES ); if ( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() ) return; SendWeaponAnim( m_iClip <= 0 ? INGRAM_IDLE_NOSHOT : INGRAM_IDLE ); }
void CFamas::__MAKE_VHOOK(WeaponIdle)() { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES); if (m_flTimeWeaponIdle <= UTIL_WeaponTimeBase()) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0f; SendWeaponAnim(FAMAS_IDLE1, UseDecrement() != FALSE); } }
void CGalil::WeaponIdle() { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES); if (m_flTimeWeaponIdle <= UTIL_WeaponTimeBase()) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0f; SendWeaponAnim(GALIL_IDLE1, UseDecrement() != FALSE); } }
void CAWP::WeaponIdle(void) { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES); if (m_flTimeWeaponIdle <= UTIL_WeaponTimeBase() && m_iClip) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60; SendWeaponAnim(AWP_IDLE, UseDecrement() != FALSE); } }
void CTMP::WeaponIdle(void) { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES); if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase()) return; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20; SendWeaponAnim(TMP_IDLE1, UseDecrement() != FALSE); }
void CShotgun::WeaponIdle( void ) { ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); if (m_flTimeWeaponIdle < UTIL_WeaponTimeBase() ) { if (m_iClip == 0 && m_InSpecialReload == ReloadState::NOT_RELOADING && m_pPlayer->m_rgAmmo[ PrimaryAmmoIndex() ]) { Reload( ); } else if (m_InSpecialReload != ReloadState::NOT_RELOADING ) { if (m_iClip != iMaxClip() && m_pPlayer->m_rgAmmo[ PrimaryAmmoIndex() ]) { Reload( ); } else { // reload debounce has timed out SendWeaponAnim( SHOTGUN_PUMP ); // play cocking sound EMIT_SOUND_DYN( m_pPlayer, CHAN_ITEM, "weapons/scock1.wav", 1, ATTN_NORM, 0, 95 + RANDOM_LONG(0,0x1f)); m_InSpecialReload = ReloadState::NOT_RELOADING; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5; } } else { int iAnim; float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 ); if (flRand <= 0.8) { iAnim = SHOTGUN_IDLE_DEEP; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + (60.0/12.0);// * RANDOM_LONG(2, 5); } else if (flRand <= 0.95) { iAnim = SHOTGUN_IDLE; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + (20.0/9.0); } else { iAnim = SHOTGUN_IDLE4; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + (20.0/9.0); } SendWeaponAnim( iAnim ); } } }
/* <2810cf> ../cstrike/dlls/wpn_shared/wpn_m4a1.cpp:279 */ void CM4A1::__MAKE_VHOOK(WeaponIdle)() { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES); if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase()) { return; } m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0f; SendWeaponAnim((m_iWeaponState & WPNSTATE_M4A1_SILENCED) == WPNSTATE_M4A1_SILENCED ? M4A1_IDLE : M4A1_UNSIL_IDLE, UseDecrement() != FALSE); }
void CDEAGLE::WeaponIdle(void) { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES); if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase()) return; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20; if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN) SendWeaponAnim(SHIELDGUN_DRAWN_IDLE, UseDecrement() != FALSE); }
void CDEAGLE::WeaponIdle( void ) { ResetEmptySound( ); m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase()) return; SendWeaponAnim( DEAGLE_IDLE1 ); m_flTimeWeaponIdle = UTIL_SharedRandomFloat(m_pPlayer->random_seed, 10, 15); }
void CSG552::__MAKE_VHOOK(WeaponIdle)() { ResetEmptySound(); m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES); if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase()) { return; } m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20.0f; SendWeaponAnim(SG552_IDLE1, UseDecrement() != FALSE); }
void CGauss::WeaponIdle( void ) { ResetEmptySound( ); // play aftershock static discharge if ( m_pPlayer->m_flPlayAftershock && m_pPlayer->m_flPlayAftershock < gpGlobals->time ) { switch (RANDOM_LONG(0,3)) { case 0: EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/electro4.wav", RANDOM_FLOAT(0.7, 0.8), ATTN_NORM); break; case 1: EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/electro5.wav", RANDOM_FLOAT(0.7, 0.8), ATTN_NORM); break; case 2: EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/electro6.wav", RANDOM_FLOAT(0.7, 0.8), ATTN_NORM); break; case 3: break; // no sound } m_pPlayer->m_flPlayAftershock = 0.0; } if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase()) return; if (m_fInAttack != 0) { StartFire(); m_fInAttack = 0; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.0; } else { int iAnim; float flRand = RANDOM_FLOAT(0, 1); if (flRand <= 0.5) { iAnim = GAUSS_IDLE; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); } else if (flRand <= 0.75) { iAnim = GAUSS_IDLE2; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); } else { iAnim = GAUSS_FIDGET; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3; } return; SendWeaponAnim( iAnim ); } }
void CFamas::WeaponIdle() { ResetEmptySound(); m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES ); if ( m_flTimeWeaponIdle > UTIL_WeaponTimeBase() ) { return; } m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + FAMAS_IDLE_INTERVAL; SendWeaponAnim( FAMAS_IDLE, UseDecrement() ); }