Skip to content

Commit

Permalink
AUG/SG552: Reset maxspeed when zooming
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Dec 10, 2024
1 parent 942f2e6 commit 3efc5ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_aug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
9 changes: 9 additions & 0 deletions regamedll/dlls/wpn_shared/wpn_sg552.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3efc5ad

Please sign in to comment.