void CAWP::__MAKE_VHOOK(Reload)() { if (m_pPlayer->ammo_338mag <= 0) return; if (DefaultReload(AWP_MAX_CLIP, AWP_RELOAD, AWP_RELOAD_TIME)) { m_pPlayer->SetAnimation(PLAYER_RELOAD); if (m_pPlayer->pev->fov != DEFAULT_FOV) { m_pPlayer->m_iFOV = 10; m_pPlayer->pev->fov = 10; SecondaryAttack(); } } }
void CAWP::Reload( void ) { if ( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 || m_iClip == 10 ) return; m_pPlayer->pev->fov = 0; m_pPlayer->m_iFOV = m_pPlayer->pev->fov; scope = false; g_engfuncs.pfnSetClientMaxspeed(m_pPlayer->edict(), 210 ); #ifndef CLIENT_DLL MESSAGE_BEGIN( MSG_ONE, gmsgScopeToggle, NULL, m_pPlayer->pev ); WRITE_BYTE( 0 ); MESSAGE_END(); #endif DefaultReload( 10, AWP_RELOAD, 3.3 ); }
void CSG552::__MAKE_VHOOK(Reload)() { if (m_pPlayer->ammo_556nato <= 0) return; if (DefaultReload(SG552_MAX_CLIP, SG552_RELOAD, SG552_RELOAD_TIME)) { if (m_pPlayer->m_iFOV != DEFAULT_FOV) { SecondaryAttack(); } m_pPlayer->SetAnimation(PLAYER_RELOAD); m_flAccuracy = 0.2f; m_iShotsFired = 0; m_bDelayFire = false; } }
void CAWP::Reload(void) { if (m_pPlayer->ammo_338mag <= 0) { return; } if (DefaultReload(AWP_MAX_CLIP, AWP_RELOAD, AWP_RELOAD_TIME)) { m_pPlayer->SetAnimation(PLAYER_RELOAD); if (m_pPlayer->pev->fov != 90) { m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 10; SecondaryAttack(); } } }
/* <2a0d98> ../cstrike/dlls/wpn_shared/wpn_sg550.cpp:227 */ void CSG550::__MAKE_VHOOK(Reload)(void) { if (m_pPlayer->ammo_556nato <= 0) { return; } if (DefaultReload(SG550_MAX_CLIP, SG550_RELOAD, SG550_RELOAD_TIME)) { m_pPlayer->SetAnimation(PLAYER_RELOAD); if (m_pPlayer->pev->fov != DEFAULT_FOV) { m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 15; SecondaryAttack(); } } }
//----------------------------------------------------------------------------- //----------------------------------------------------------------------------- bool CWeaponSMG1::Reload( void ) { bool fRet; float fCacheTime = m_flNextSecondaryAttack; fRet = DefaultReload( GetMaxClip1(), GetMaxClip2(), ACT_VM_RELOAD ); if ( fRet ) { // Undo whatever the reload process has done to our secondary // attack timer. We allow you to interrupt reloading to fire // a grenade. m_flNextSecondaryAttack = GetOwner()->m_flNextAttack = fCacheTime; WeaponSound( RELOAD ); } return fRet; }
void CFamas::__MAKE_VHOOK(Reload)() { if (m_pPlayer->ammo_556nato <= 0) return; if (DefaultReload(iMaxClip(), FAMAS_RELOAD, FAMAS_RELOAD_TIME)) { m_pPlayer->SetAnimation(PLAYER_RELOAD); if (m_pPlayer->m_iFOV != DEFAULT_FOV) { SecondaryAttack(); } m_flAccuracy = 0; m_iShotsFired = 0; m_bDelayFire = false; } }
/* <260d53> ../cstrike/dlls/wpn_shared/wpn_g3sg1.cpp:234 */ void CG3SG1::__MAKE_VHOOK(Reload)(void) { if (m_pPlayer->ammo_762nato <= 0) { return; } if (DefaultReload(G3SG1_MAX_CLIP, G3SG1_RELOAD, G3SG1_RELOAD_TIME)) { m_flAccuracy = 0.2; m_pPlayer->SetAnimation(PLAYER_RELOAD); if (m_pPlayer->pev->fov != DEFAULT_FOV) { m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 15; SecondaryAttack(); } } }
/* <276a02> ../cstrike/dlls/wpn_shared/wpn_m249.cpp:201 */ void CM249::__MAKE_VHOOK(Reload)(void) { #ifdef REGAMEDLL_FIXES // to prevent reload if not enough ammo if (m_pPlayer->ammo_556natobox <= 0) { return; } #endif // REGAMEDLL_FIXES if (DefaultReload(M249_MAX_CLIP, M249_RELOAD, M249_RELOAD_TIME)) { m_pPlayer->SetAnimation(PLAYER_RELOAD); m_flAccuracy = 0.2; m_bDelayFire = false; m_iShotsFired = 0; } }
bool CWeaponUzi::Reload( void ) { bool fRet; float fCacheTime = m_flNextSecondaryAttack; fRet = DefaultReload( GetMaxClip1(), GetMaxClip2(), ACT_VM_RELOAD ); if ( fRet ) { // Undo whatever the reload process has done to our secondary // attack timer. We allow you to interrupt reloading to fire // a grenade. m_flNextSecondaryAttack = GetOwner()->m_flNextAttack = fCacheTime; WeaponSound( RELOAD ); ToHL2MPPlayer(GetOwner())->DoAnimationEvent( PLAYERANIMEVENT_RELOAD ); } m_flNextPrimaryAttack = gpGlobals->curtime + 1,466666666666667; return fRet; }
void CUSP::Reload(void) { if (m_pPlayer->ammo_45acp <= 0) return; int iAnim; if (m_pPlayer->HasShield() != false) iAnim = USP_SHIELD_RELOAD; else if (m_iWeaponState & WPNSTATE_USP_SILENCED) iAnim = USP_RELOAD; else iAnim = USP_UNSIL_RELOAD; if (DefaultReload(USP_MAX_CLIP, iAnim, 2.7)) { m_pPlayer->SetAnimation(PLAYER_RELOAD); m_flAccuracy = 0.92; } }
void CM4A1::Reload(void) { if (m_pPlayer->ammo_556nato <= 0) return; int iAnim; if (m_iWeaponState & WPNSTATE_M4A1_SILENCED) iAnim = M4A1_RELOAD; else iAnim = M4A1_UNSIL_RELOAD; if (DefaultReload(M4A1_MAX_CLIP, iAnim, 3.05)) { m_pPlayer->SetAnimation(PLAYER_RELOAD); m_flAccuracy = 0.2; m_iShotsFired = 0; m_bDelayFire = false; } }
void CUSP::Reload() { if( m_pPlayer->ammo_45acp <= 0 ) { return; } int reloadAnim; if( m_pPlayer->HasShield() ) reloadAnim = USP_SHOOTLAST; else reloadAnim = FBitSet( m_fWeaponState, WEAPONSTATE_USP_SILENCED ) ? USP_RELOAD : USP_RELOAD_UNSIL; if( DefaultReload( USP_MAX_CLIP, reloadAnim, USP_RELOAD_TIME ) ) { m_pPlayer->SetAnimation( PLAYER_RELOAD ); m_flAccuracy = USP_MAX_INACCURACY; } }
void CPython::Reload( void ) { if ( m_pPlayer->ammo_357 <= 0 ) return; if ( m_pPlayer->pev->fov != 0 ) { m_fInZoom = FALSE; m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 0; // 0 means reset to default fov } int bUseScope = FALSE; #ifdef CLIENT_DLL bUseScope = bIsMultiplayer(); #else bUseScope = g_pGameRules->IsMultiplayer(); #endif DefaultReload( 6, PYTHON_RELOAD, 2.0, bUseScope ); }
void CP228::Reload(void) { if (m_pPlayer->ammo_357sig <= 0) return; int iAnim; if (m_pPlayer->HasShield() != false) iAnim = P228_SHIELD_RELOAD; else iAnim = P228_RELOAD; if (DefaultReload(P228_MAX_CLIP, iAnim, 2.7)) { #ifndef CLIENT_DLL m_pPlayer->SetAnimation(PLAYER_RELOAD); #endif m_flAccuracy = 0.9; } }
void CFamas::Reload() { if ( m_pPlayer->ammo_556nato <= 0 ) { return; } if( DefaultReload( FAMAS_MAX_CLIP, FAMAS_RELOAD, FAMAS_RELOAD_TIME ) ) { m_pPlayer->SetAnimation( PLAYER_RELOAD ); if( m_pPlayer->m_iFOV != 90 ) { SecondaryAttack(); } m_flAccuracy = 0.0; m_iShotsFired = 0; m_fDelayFire = FALSE; } }
//----------------------------------------------------------------------------- //----------------------------------------------------------------------------- bool CWeaponTranquilizer::Reload( void ) { bool fRet; float fCacheTime = m_flNextSecondaryAttack; bool ResetPrimaryFire = m_flNextPrimaryAttack < gpGlobals->curtime; fRet = DefaultReload( GetMaxClip1(), GetMaxClip2(), ACT_VM_RELOAD ); if ( fRet ) { // Undo whatever the reload process has done to our secondary // attack timer. We allow you to interrupt reloading to fire // a grenade. m_flNextSecondaryAttack = GetOwner()->m_flNextAttack = fCacheTime; WeaponSound( RELOAD ); if(ResetPrimaryFire) m_flNextPrimaryAttack = gpGlobals->curtime; } return fRet; }
void CIngram::Reload( void ) { if ( m_pPlayer->ammo_9mm <= 0 ) return; int iResult; float reloadTime = 1.5f; if ( m_iClip == 0 ) { reloadTime += 10.0f / 30.0f; } int anim = m_iClip == 0 ? INGRAM_RELOAD : INGRAM_RELOAD_NOT_EMPTY; if ( gameplayMods::IsSlowmotionEnabled() ) { anim++; } iResult = DefaultReload( INGRAM_MAX_CLIP, anim, reloadTime, 0, reloadTime / 2.0f ); if (iResult) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); } }
bool CWeaponMP5::Reload( ) { CSDKPlayer *pPlayer = GetPlayerOwner(); if (pPlayer->GetAmmoCount( GetPrimaryAmmoType() ) <= 0) return false; int iResult = DefaultReload( GetMaxClip1(), GetMaxClip2(), ACT_VM_RELOAD ); if ( !iResult ) return false; pPlayer->SetAnimation( PLAYER_RELOAD ); #ifndef CLIENT_DLL if ((iResult) && (pPlayer->GetFOV() != pPlayer->GetDefaultFOV())) { pPlayer->SetFOV( pPlayer, pPlayer->GetDefaultFOV() ); } #endif pPlayer->m_iShotsFired = 0; return true; }
void CAK74::Reload( void ) { DefaultReload( 30, AK74_RELOAD, 2, 0.8 ); }
void CDEAGLE::Reload( void ) { DefaultReload( 7, DEAGLE_RELOAD, 2.2 ); }
void CPython::Reload( void ) { if (m_fInZoom == TRUE) { m_pPlayer->b_EstaEnZoom = FALSE; #ifndef CLIENT_DLL m_pPlayer->pev->viewmodel = MAKE_STRING("models/weapons/357/v_357.mdl"); #else LoadVModel ( "models/weapons/357/v_357.mdl", m_pPlayer ); #endif m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 0; // 0 means reset to default fov m_fInZoom = FALSE; } int iResult; if (m_iClip == 0) iResult = DefaultReload( 7, PYTHON_RELOAD, 2.53 ); else iResult = DefaultReload( 7, PYTHON_RELOAD, 2.2 ); if (iResult) { m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); m_pPlayer->SetAnimation( PLAYER_RELOAD ); Vector vecSrc = m_pPlayer->GetGunPosition( ); CBaseEntity *pEntity = Create( "item_clip_pistol", vecSrc, pev->angles ); } /* // SHOTGUN_MAX_CLIP if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 || m_iClip == PYTHON_MAX_CLIP) return; // don't reload until recoil is done if (m_flNextPrimaryAttack > UTIL_WeaponTimeBase()) return; // check to see if we're ready to reload if (m_fInSpecialReload == 0) { //SendWeaponAnim( PYTHON_RELOAD_HAS_0 ); if (m_iClip == 0) SendWeaponAnim( PYTHON_RELOAD_HAS_0 ); else if (m_iClip == 1) SendWeaponAnim( PYTHON_RELOAD_HAS_1 ); else if (m_iClip == 2) SendWeaponAnim( PYTHON_RELOAD_HAS_2 ); else if (m_iClip == 3) SendWeaponAnim( PYTHON_RELOAD_HAS_3 ); else if (m_iClip == 4) SendWeaponAnim( PYTHON_RELOAD_HAS_4 ); else if (m_iClip == 5) SendWeaponAnim( PYTHON_RELOAD_HAS_5 ); m_fInSpecialReload = 1; //0.6 m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 2.6; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.6; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.0; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.0; return; } else if (m_fInSpecialReload == 1) { if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase()) return; // was waiting for gun to move to side m_fInSpecialReload = 2; if (RANDOM_LONG(0,1)) EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/357/357_reload-1.wav", 1, ATTN_NORM, 0, 85 + RANDOM_LONG(0,0x1f)); else EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/357/357_reload-2.wav", 1, ATTN_NORM, 0, 85 + RANDOM_LONG(0,0x1f)); // SendWeaponAnim( PYTHON_RELOAD_INSERT_6 ); if (m_iClip == 0) SendWeaponAnim( PYTHON_RELOAD_INSERT_1 ); else if (m_iClip == 1) SendWeaponAnim( PYTHON_RELOAD_INSERT_2 ); else if (m_iClip == 2) SendWeaponAnim( PYTHON_RELOAD_INSERT_3 ); else if (m_iClip == 3) SendWeaponAnim( PYTHON_RELOAD_INSERT_4 ); else if (m_iClip == 4) SendWeaponAnim( PYTHON_RELOAD_INSERT_5 ); else if (m_iClip == 5) SendWeaponAnim( PYTHON_RELOAD_INSERT_6 ); m_pPlayer->SetAnimation( PLAYER_RELOAD ); m_flNextReload = UTIL_WeaponTimeBase() + 0.5; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5; } else { // Add them to the clip m_iClip += 1; m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] -= 1; m_fInSpecialReload = 1; }*/ }
void CBiorifle::Reload( void ) { DefaultReload( 18, BIORIFLE_RELOAD, 2.7, 0.87 ); }
void Cu2::Reload( void ) { ZoomReset(); DefaultReload( 30, U2_RELOAD, 2.9, 1.1 ); m_iChargeLevel = 2; }
void CWHL::Reload( void ) { if (m_iClip) return; DefaultReload( 1, WHL_RELOAD, 2.5 ); }
void CTEST::Reload( void ) { UpdateSpot( ); DefaultReload( TEST_MAX_CLIP, TEST_RELOAD, 1.5 ); }
void CM16::Reload( void ) { // EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/m16_reload.wav", 0.8, ATTN_NORM); DefaultReload( M16_MAX_CLIP, M16_RELOAD, 93 / 32.0 ); }
void Cawp::Reload( void ) { ZoomReset(); DefaultReload( 10, AWP_RELOAD, 3.7, 1.1 ); }
void CAK47::Reload( void ) { DefaultReload( 30, AK47_RELOAD, 2.45 ); }