diff --git a/regamedll/dlls/wpn_shared/wpn_c4.cpp b/regamedll/dlls/wpn_shared/wpn_c4.cpp index e1a0c0a0b..e562cce51 100644 --- a/regamedll/dlls/wpn_shared/wpn_c4.cpp +++ b/regamedll/dlls/wpn_shared/wpn_c4.cpp @@ -226,6 +226,9 @@ void CC4::PrimaryAttack() if (--m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0) { RetireWeapon(); +#ifdef REGAMEDLL_FIXES + DestroyItem(); +#endif return; } } diff --git a/regamedll/dlls/wpn_shared/wpn_flashbang.cpp b/regamedll/dlls/wpn_shared/wpn_flashbang.cpp index bf8e4f305..df34c2e5b 100644 --- a/regamedll/dlls/wpn_shared/wpn_flashbang.cpp +++ b/regamedll/dlls/wpn_shared/wpn_flashbang.cpp @@ -220,7 +220,26 @@ void CFlashbang::WeaponIdle() { // we've finished the throw, restart. m_flStartThrow = 0; + +#ifndef REGAMEDLL_FIXES RetireWeapon(); +#else + // from CHEGrenade::WeaponIdle(), CSmokeGrenade::WeaponIdle() + if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]) + { + SendWeaponAnim(FLASHBANG_DRAW, UseDecrement() != FALSE); + } + else + { + RetireWeapon(); + DestroyItem(); + return; + } + + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT(10, 15); + m_flReleaseThrow = -1.0f; +#endif + } else if (m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]) { @@ -263,5 +282,10 @@ void CFlashbang::WeaponIdle() BOOL CFlashbang::CanDeploy() { +#ifndef REGAMEDLL_FIXES return m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] != 0; +#else + return TRUE; +#endif + } diff --git a/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp b/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp index 338ae2179..2349bd09d 100644 --- a/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp +++ b/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp @@ -229,6 +229,9 @@ void CHEGrenade::WeaponIdle() else { RetireWeapon(); +#ifdef REGAMEDLL_FIXES + DestroyItem(); +#endif return; } @@ -258,5 +261,10 @@ void CHEGrenade::WeaponIdle() BOOL CHEGrenade::CanDeploy() { +#ifndef REGAMEDLL_FIXES return m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] != 0; +#else + return TRUE; +#endif + } diff --git a/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp b/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp index 306b508f3..66238691f 100644 --- a/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp +++ b/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp @@ -230,6 +230,9 @@ void CSmokeGrenade::WeaponIdle() else { RetireWeapon(); +#ifdef REGAMEDLL_FIXES + DestroyItem(); +#endif return; } @@ -272,5 +275,10 @@ void CSmokeGrenade::WeaponIdle() BOOL CSmokeGrenade::CanDeploy() { +#ifndef REGAMEDLL_FIXES return m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] != 0; +#else + return TRUE; +#endif + }