From 3efc5ad16678a25c240560cdd4d8a996b019357d Mon Sep 17 00:00:00 2001 From: s1lentq Date: Wed, 11 Dec 2024 02:19:09 +0700 Subject: [PATCH] AUG/SG552: Reset maxspeed when zooming --- regamedll/dlls/wpn_shared/wpn_aug.cpp | 9 +++++++++ regamedll/dlls/wpn_shared/wpn_sg552.cpp | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/regamedll/dlls/wpn_shared/wpn_aug.cpp b/regamedll/dlls/wpn_shared/wpn_aug.cpp index 988c7480..dfba3fdf 100644 --- a/regamedll/dlls/wpn_shared/wpn_aug.cpp +++ b/regamedll/dlls/wpn_shared/wpn_aug.cpp @@ -73,6 +73,15 @@ void CAUG::SecondaryAttack() else m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 90; +#ifdef REGAMEDLL_FIXES + if (TheBots) + { + TheBots->OnEvent(EVENT_WEAPON_ZOOMED, m_pPlayer); + } + + m_pPlayer->ResetMaxSpeed(); +#endif + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.3f; } diff --git a/regamedll/dlls/wpn_shared/wpn_sg552.cpp b/regamedll/dlls/wpn_shared/wpn_sg552.cpp index e86eec41..f9eb61f5 100644 --- a/regamedll/dlls/wpn_shared/wpn_sg552.cpp +++ b/regamedll/dlls/wpn_shared/wpn_sg552.cpp @@ -72,6 +72,15 @@ void CSG552::SecondaryAttack() else m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 90; +#ifdef REGAMEDLL_FIXES + if (TheBots) + { + TheBots->OnEvent(EVENT_WEAPON_ZOOMED, m_pPlayer); + } + + m_pPlayer->ResetMaxSpeed(); +#endif + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.3f; }