Skip to content

Commit

Permalink
Fix Reload en armas
Browse files Browse the repository at this point in the history
  • Loading branch information
aleeperezz16 committed Jan 4, 2024
1 parent 699ab58 commit 06621e0
Show file tree
Hide file tree
Showing 22 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion regamedll/dlls/wpn_shared/wpn_ak47.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void CAK47::AK47Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CAK47::Reload()
{
#ifdef REGAMEDLL_FIXES
#ifndef REGAMEDLL_FIXES
// to prevent reload if not enough ammo
if (m_pPlayer->ammo_762nato <= 0)
return;
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_aug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ void CAUG::AUGFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CAUG::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_556nato <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), AUG_RELOAD, AUG_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_awp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ void CAWP::AWPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CAWP::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_338mag <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), AWP_RELOAD, AWP_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_deagle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@ void CDEAGLE::DEAGLEFire(float flSpread, float flCycleTime, BOOL fUseSemi)

void CDEAGLE::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_50ae <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), DEAGLE_RELOAD, DEAGLE_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_elite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,10 @@ void CELITE::ELITEFire(float flSpread, float flCycleTime, BOOL fUseSemi)

void CELITE::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_9mm <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), ELITE_RELOAD, ELITE_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_famas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,10 @@ void CFamas::FamasFire(float flSpread, float flCycleTime, BOOL fUseAutoAim, BOOL

void CFamas::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_556nato <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), FAMAS_RELOAD, FAMAS_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_fiveseven.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ void CFiveSeven::FiveSevenFire(float flSpread, float flCycleTime, BOOL fUseSemi)

void CFiveSeven::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_57mm <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), FIVESEVEN_RELOAD, FIVESEVEN_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_g3sg1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ void CG3SG1::G3SG1Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CG3SG1::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_762nato <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), G3SG1_RELOAD, G3SG1_RELOAD_TIME))
{
Expand Down
2 changes: 1 addition & 1 deletion regamedll/dlls/wpn_shared/wpn_galil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void CGalil::GalilFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CGalil::Reload()
{
#ifdef REGAMEDLL_FIXES
#ifndef REGAMEDLL_FIXES
// to prevent reload if not enough ammo
if (m_pPlayer->ammo_556nato <= 0)
return;
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_glock18.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,10 @@ void CGLOCK18::GLOCK18Fire(float flSpread, float flCycleTime, BOOL bFireBurst)
void CGLOCK18::Reload()
{
int iResult;
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_9mm <= 0)
return;
#endif

if (m_pPlayer->HasShield())
iResult = GLOCK18_SHIELD_RELOAD;
Expand Down
2 changes: 1 addition & 1 deletion regamedll/dlls/wpn_shared/wpn_m249.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void CM249::M249Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CM249::Reload()
{
#ifdef REGAMEDLL_FIXES
#ifndef REGAMEDLL_FIXES
// to prevent reload if not enough ammo
if (m_pPlayer->ammo_556natobox <= 0)
return;
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_m4a1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ void CM4A1::M4A1Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CM4A1::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_556nato <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), ((m_iWeaponState & WPNSTATE_M4A1_SILENCED) == WPNSTATE_M4A1_SILENCED) ? M4A1_RELOAD : M4A1_UNSIL_RELOAD, M4A1_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_mac10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ void CMAC10::MAC10Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CMAC10::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_45acp <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), MAC10_RELOAD, MAC10_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_mp5navy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ void CMP5N::MP5NFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CMP5N::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_9mm <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), MP5N_RELOAD, MP5N_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_p228.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ void CP228::P228Fire(float flSpread, float flCycleTime, BOOL fUseSemi)

void CP228::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_357sig <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), m_pPlayer->HasShield() ? P228_SHIELD_RELOAD : P228_RELOAD, P228_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_p90.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ void CP90::P90Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CP90::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_57mm <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), P90_RELOAD, P90_RELOAD_TIME))
{
Expand Down
2 changes: 1 addition & 1 deletion regamedll/dlls/wpn_shared/wpn_scout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void CSCOUT::SCOUTFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CSCOUT::Reload()
{
#ifdef REGAMEDLL_FIXES
#ifndef REGAMEDLL_FIXES
// to prevent reload if not enough ammo
if (m_pPlayer->ammo_762nato <= 0)
return;
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_sg550.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ void CSG550::SG550Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CSG550::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_556nato <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), SG550_RELOAD, SG550_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_sg552.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ void CSG552::SG552Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CSG552::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_556nato <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), SG552_RELOAD, SG552_RELOAD_TIME))
{
Expand Down
2 changes: 1 addition & 1 deletion regamedll/dlls/wpn_shared/wpn_tmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void CTMP::TMPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CTMP::Reload()
{
#ifdef REGAMEDLL_FIXES
#ifndef REGAMEDLL_FIXES
// to prevent reload if not enough ammo
if (m_pPlayer->ammo_9mm <= 0)
return;
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_ump45.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ void CUMP45::UMP45Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)

void CUMP45::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_45acp <= 0)
return;
#endif

if (DefaultReload(iMaxClip(), UMP45_RELOAD, UMP45_RELOAD_TIME))
{
Expand Down
2 changes: 2 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_usp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,10 @@ void CUSP::USPFire(float flSpread, float flCycleTime, BOOL fUseSemi)

void CUSP::Reload()
{
#ifndef REGAMEDLL_FIXES
if (m_pPlayer->ammo_45acp <= 0)
return;
#endif

int iAnim;
if (m_pPlayer->HasShield())
Expand Down

0 comments on commit 06621e0

Please sign in to comment.