diff --git a/regamedll/dlls/weapons.h b/regamedll/dlls/weapons.h index 45020c39d..bd22989e3 100644 --- a/regamedll/dlls/weapons.h +++ b/regamedll/dlls/weapons.h @@ -581,6 +581,11 @@ const float MP5N_MAX_SPEED = 250.0f; const float MP5N_DAMAGE = 26.0f; const float MP5N_RANGE_MODIFER = 0.84f; const float MP5N_RELOAD_TIME = 2.63f; +#ifdef REGAMEDLL_FIXES +const float MP5N_ACCURACY_DIVISOR = 220.1f; +#else +const double MP5N_ACCURACY_DIVISOR = 220.1; +#endif enum mp5n_e { @@ -629,6 +634,11 @@ const float SG552_MAX_SPEED_ZOOM = 200.0f; const float SG552_DAMAGE = 33.0f; const float SG552_RANGE_MODIFER = 0.955f; const float SG552_RELOAD_TIME = 3.0f; +#ifdef REGAMEDLL_FIXES +const float SG552_ACCURACY_DIVISOR = 220.0f; +#else +const int SG552_ACCURACY_DIVISOR = 220; +#endif enum sg552_e { @@ -677,6 +687,11 @@ const float AK47_MAX_SPEED = 221.0f; const float AK47_DAMAGE = 36.0f; const float AK47_RANGE_MODIFER = 0.98f; const float AK47_RELOAD_TIME = 2.45f; +#ifdef REGAMEDLL_FIXES +const float AK47_ACCURACY_DIVISOR = 200.0f; +#else +const int AK47_ACCURACY_DIVISOR = 200; +#endif enum ak47_e { @@ -725,6 +740,11 @@ const float AUG_MAX_SPEED = 240.0f; const float AUG_DAMAGE = 32.0f; const float AUG_RANGE_MODIFER = 0.96f; const float AUG_RELOAD_TIME = 3.3f; +#ifdef REGAMEDLL_FIXES +const float AUG_ACCURACY_DIVISOR = 215.0f; +#else +const int AUG_ACCURACY_DIVISOR = 215; +#endif enum aug_e { @@ -1218,6 +1238,11 @@ const float M249_MAX_SPEED = 220.0f; const float M249_DAMAGE = 32.0f; const float M249_RANGE_MODIFER = 0.97f; const float M249_RELOAD_TIME = 4.7f; +#ifdef REGAMEDLL_FIXES +const float M249_ACCURACY_DIVISOR = 175.0f; +#else +const int M249_ACCURACY_DIVISOR = 175; +#endif enum m249_e { @@ -1313,6 +1338,11 @@ const float M4A1_DAMAGE_SIL = 33.0f; const float M4A1_RANGE_MODIFER = 0.97f; const float M4A1_RANGE_MODIFER_SIL = 0.95f; const float M4A1_RELOAD_TIME = 3.05f; +#ifdef REGAMEDLL_FIXES +const float M4A1_ACCURACY_DIVISOR = 220.0f; +#else +const int M4A1_ACCURACY_DIVISOR = 220; +#endif enum m4a1_e { @@ -1373,6 +1403,11 @@ const float MAC10_MAX_SPEED = 250.0f; const float MAC10_DAMAGE = 29.0f; const float MAC10_RANGE_MODIFER = 0.82f; const float MAC10_RELOAD_TIME = 3.15f; +#ifdef REGAMEDLL_FIXES +const float MAC10_ACCURACY_DIVISOR = 200.0f; +#else +const int MAC10_ACCURACY_DIVISOR = 200; +#endif enum mac10_e { @@ -1485,6 +1520,11 @@ const float P90_MAX_SPEED = 245.0f; const float P90_DAMAGE = 21.0f; const float P90_RANGE_MODIFER = 0.885f; const float P90_RELOAD_TIME = 3.4f; +#ifdef REGAMEDLL_FIXES +const float P90_ACCURACY_DIVISOR = 175.0f; +#else +const int P90_ACCURACY_DIVISOR = 175; +#endif enum p90_e { @@ -1627,6 +1667,11 @@ const float TMP_MAX_SPEED = 250.0f; const float TMP_DAMAGE = 20.0f; const float TMP_RANGE_MODIFER = 0.85f; const float TMP_RELOAD_TIME = 2.12f; +#ifdef REGAMEDLL_FIXES +const float TMP_ACCURACY_DIVISOR = 200.0f; +#else +const int TMP_ACCURACY_DIVISOR = 200; +#endif enum tmp_e { @@ -1830,6 +1875,11 @@ const float UMP45_MAX_SPEED = 250.0f; const float UMP45_DAMAGE = 30.0f; const float UMP45_RANGE_MODIFER = 0.82f; const float UMP45_RELOAD_TIME = 3.5f; +#ifdef REGAMEDLL_FIXES +const float UMP45_ACCURACY_DIVISOR = 210.0f; +#else +const int UMP45_ACCURACY_DIVISOR = 210; +#endif enum ump45_e { @@ -1923,6 +1973,11 @@ const float GALIL_MAX_SPEED = 240.0f; const float GALIL_DAMAGE = 30.0f; const float GALIL_RANGE_MODIFER = 0.98f; const float GALIL_RELOAD_TIME = 2.45f; +#ifdef REGAMEDLL_FIXES +const float GALIL_ACCURACY_DIVISOR = 200.0f; +#else +const int GALIL_ACCURACY_DIVISOR = 200; +#endif enum galil_e { @@ -1973,6 +2028,11 @@ const float FAMAS_RELOAD_TIME = 3.3f; const float FAMAS_DAMAGE = 30.0f; const float FAMAS_DAMAGE_BURST = 34.0f; const float FAMAS_RANGE_MODIFER = 0.96f; +#ifdef REGAMEDLL_FIXES +const float FAMAS_ACCURACY_DIVISOR = 215.0f; +#else +const int FAMAS_ACCURACY_DIVISOR = 215; +#endif enum famas_e { diff --git a/regamedll/dlls/wpn_shared/wpn_ak47.cpp b/regamedll/dlls/wpn_shared/wpn_ak47.cpp index af128bd2f..1a27a3f92 100644 --- a/regamedll/dlls/wpn_shared/wpn_ak47.cpp +++ b/regamedll/dlls/wpn_shared/wpn_ak47.cpp @@ -94,7 +94,7 @@ void CAK47::AK47Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 200) + 0.35f; + m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / AK47_ACCURACY_DIVISOR) + 0.35f; if (m_flAccuracy > 1.25f) m_flAccuracy = 1.25f; diff --git a/regamedll/dlls/wpn_shared/wpn_aug.cpp b/regamedll/dlls/wpn_shared/wpn_aug.cpp index 6747834c2..c54780f3a 100644 --- a/regamedll/dlls/wpn_shared/wpn_aug.cpp +++ b/regamedll/dlls/wpn_shared/wpn_aug.cpp @@ -104,7 +104,7 @@ void CAUG::AUGFire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 215) + 0.3f; + m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / AUG_ACCURACY_DIVISOR) + 0.3f; if (m_flAccuracy > 1.0f) m_flAccuracy = 1.0f; diff --git a/regamedll/dlls/wpn_shared/wpn_famas.cpp b/regamedll/dlls/wpn_shared/wpn_famas.cpp index f414f02b3..eb7bcc892 100644 --- a/regamedll/dlls/wpn_shared/wpn_famas.cpp +++ b/regamedll/dlls/wpn_shared/wpn_famas.cpp @@ -124,7 +124,7 @@ void CFamas::FamasFire(float flSpread, float flCycleTime, BOOL fUseAutoAim, BOOL m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = (m_iShotsFired * m_iShotsFired * m_iShotsFired / 215) + 0.3f; + m_flAccuracy = (m_iShotsFired * m_iShotsFired * m_iShotsFired / FAMAS_ACCURACY_DIVISOR) + 0.3f; if (m_flAccuracy > 1.0f) m_flAccuracy = 1.0f; diff --git a/regamedll/dlls/wpn_shared/wpn_galil.cpp b/regamedll/dlls/wpn_shared/wpn_galil.cpp index aae7ca8cc..69326075e 100644 --- a/regamedll/dlls/wpn_shared/wpn_galil.cpp +++ b/regamedll/dlls/wpn_shared/wpn_galil.cpp @@ -92,7 +92,7 @@ void CGalil::GalilFire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 200) + 0.35f; + m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / GALIL_ACCURACY_DIVISOR) + 0.35f; if (m_flAccuracy > 1.25f) m_flAccuracy = 1.25f; diff --git a/regamedll/dlls/wpn_shared/wpn_m249.cpp b/regamedll/dlls/wpn_shared/wpn_m249.cpp index 7b873df3f..45d7290be 100644 --- a/regamedll/dlls/wpn_shared/wpn_m249.cpp +++ b/regamedll/dlls/wpn_shared/wpn_m249.cpp @@ -91,7 +91,7 @@ void CM249::M249Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 175) + 0.4f; + m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / M249_ACCURACY_DIVISOR) + 0.4f; if (m_flAccuracy > 0.9f) m_flAccuracy = 0.9f; diff --git a/regamedll/dlls/wpn_shared/wpn_m4a1.cpp b/regamedll/dlls/wpn_shared/wpn_m4a1.cpp index 4f4271c76..89ea81b5b 100644 --- a/regamedll/dlls/wpn_shared/wpn_m4a1.cpp +++ b/regamedll/dlls/wpn_shared/wpn_m4a1.cpp @@ -137,7 +137,7 @@ void CM4A1::M4A1Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 220) + 0.3f; + m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / M4A1_ACCURACY_DIVISOR) + 0.3f; if (m_flAccuracy > 1) m_flAccuracy = 1; diff --git a/regamedll/dlls/wpn_shared/wpn_mac10.cpp b/regamedll/dlls/wpn_shared/wpn_mac10.cpp index 4802f6f48..b05170882 100644 --- a/regamedll/dlls/wpn_shared/wpn_mac10.cpp +++ b/regamedll/dlls/wpn_shared/wpn_mac10.cpp @@ -84,7 +84,7 @@ void CMAC10::MAC10Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 200) + 0.6f; + m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / MAC10_ACCURACY_DIVISOR) + 0.6f; if (m_flAccuracy > 1.65f) m_flAccuracy = 1.65f; diff --git a/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp b/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp index 39e7aeee0..3a1b679a6 100644 --- a/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp +++ b/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp @@ -85,7 +85,7 @@ void CMP5N::MP5NFire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = ((m_iShotsFired * m_iShotsFired) / 220.1) + 0.45f; + m_flAccuracy = ((m_iShotsFired * m_iShotsFired) / MP5N_ACCURACY_DIVISOR) + 0.45f; if (m_flAccuracy > 0.75f) m_flAccuracy = 0.75f; diff --git a/regamedll/dlls/wpn_shared/wpn_p90.cpp b/regamedll/dlls/wpn_shared/wpn_p90.cpp index 722be151d..7f3cc606f 100644 --- a/regamedll/dlls/wpn_shared/wpn_p90.cpp +++ b/regamedll/dlls/wpn_shared/wpn_p90.cpp @@ -92,7 +92,7 @@ void CP90::P90Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = (m_iShotsFired * m_iShotsFired / 175) + 0.45f; + m_flAccuracy = (m_iShotsFired * m_iShotsFired / P90_ACCURACY_DIVISOR) + 0.45f; if (m_flAccuracy > 1) m_flAccuracy = 1; diff --git a/regamedll/dlls/wpn_shared/wpn_sg552.cpp b/regamedll/dlls/wpn_shared/wpn_sg552.cpp index 07e0a0e65..c95a66878 100644 --- a/regamedll/dlls/wpn_shared/wpn_sg552.cpp +++ b/regamedll/dlls/wpn_shared/wpn_sg552.cpp @@ -103,7 +103,7 @@ void CSG552::SG552Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 220) + 0.3f; + m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / SG552_ACCURACY_DIVISOR) + 0.3f; if (m_flAccuracy > 1.0f) m_flAccuracy = 1.0f; diff --git a/regamedll/dlls/wpn_shared/wpn_tmp.cpp b/regamedll/dlls/wpn_shared/wpn_tmp.cpp index 2b3c989ce..10378abc2 100644 --- a/regamedll/dlls/wpn_shared/wpn_tmp.cpp +++ b/regamedll/dlls/wpn_shared/wpn_tmp.cpp @@ -84,7 +84,7 @@ void CTMP::TMPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 200) + 0.55f; + m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / TMP_ACCURACY_DIVISOR) + 0.55f; if (m_flAccuracy > 1.4f) m_flAccuracy = 1.4f; diff --git a/regamedll/dlls/wpn_shared/wpn_ump45.cpp b/regamedll/dlls/wpn_shared/wpn_ump45.cpp index 079b6d90d..73ada761e 100644 --- a/regamedll/dlls/wpn_shared/wpn_ump45.cpp +++ b/regamedll/dlls/wpn_shared/wpn_ump45.cpp @@ -88,7 +88,7 @@ void CUMP45::UMP45Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim) m_bDelayFire = true; m_iShotsFired++; - m_flAccuracy = ((m_iShotsFired * m_iShotsFired) / 210) + 0.5f; + m_flAccuracy = ((m_iShotsFired * m_iShotsFired) / UMP45_ACCURACY_DIVISOR) + 0.5f; if (m_flAccuracy > 1.0f) m_flAccuracy = 1.0f;