mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 23:25:41 +03:00
Fix: 'fast fire glitch' at AUG/SG552 (#734)
* Fix 'fast fire glitch' at AUG/SG552 Bug is caused because of not checking his FOV in some conditions. * refactoring Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
This commit is contained in:
parent
1c68cb0c98
commit
7caf748a61
@ -78,21 +78,19 @@ void CAUG::SecondaryAttack()
|
|||||||
|
|
||||||
void CAUG::PrimaryAttack()
|
void CAUG::PrimaryAttack()
|
||||||
{
|
{
|
||||||
|
const float flCycleTime = (m_pPlayer->pev->fov == DEFAULT_FOV) ? 0.0825f : 0.135f;
|
||||||
|
|
||||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||||
{
|
{
|
||||||
AUGFire(0.035 + (0.4 * m_flAccuracy), 0.0825, FALSE);
|
AUGFire(0.035 + (0.4 * m_flAccuracy), flCycleTime, FALSE);
|
||||||
}
|
}
|
||||||
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
||||||
{
|
{
|
||||||
AUGFire(0.035 + (0.07 * m_flAccuracy), 0.0825, FALSE);
|
AUGFire(0.035 + (0.07 * m_flAccuracy), flCycleTime, FALSE);
|
||||||
}
|
|
||||||
else if (m_pPlayer->pev->fov == DEFAULT_FOV)
|
|
||||||
{
|
|
||||||
AUGFire(0.02 * m_flAccuracy, 0.0825, FALSE);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AUGFire(0.02 * m_flAccuracy, 0.135, FALSE);
|
AUGFire(0.02 * m_flAccuracy, flCycleTime, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,21 +77,19 @@ void CSG552::SecondaryAttack()
|
|||||||
|
|
||||||
void CSG552::PrimaryAttack()
|
void CSG552::PrimaryAttack()
|
||||||
{
|
{
|
||||||
|
const float flCycleTime = (m_pPlayer->pev->fov == DEFAULT_FOV) ? 0.0825f : 0.135f;
|
||||||
|
|
||||||
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
if (!(m_pPlayer->pev->flags & FL_ONGROUND))
|
||||||
{
|
{
|
||||||
SG552Fire(0.035 + (0.45 * m_flAccuracy), 0.0825, FALSE);
|
SG552Fire(0.035 + (0.45 * m_flAccuracy), flCycleTime, FALSE);
|
||||||
}
|
}
|
||||||
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
else if (m_pPlayer->pev->velocity.Length2D() > 140)
|
||||||
{
|
{
|
||||||
SG552Fire(0.035 + (0.075 * m_flAccuracy), 0.0825, FALSE);
|
SG552Fire(0.035 + (0.075 * m_flAccuracy), flCycleTime, FALSE);
|
||||||
}
|
|
||||||
else if (m_pPlayer->pev->fov == DEFAULT_FOV)
|
|
||||||
{
|
|
||||||
SG552Fire(0.02 * m_flAccuracy, 0.0825, FALSE);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SG552Fire(0.02 * m_flAccuracy, 0.135, FALSE);
|
SG552Fire(0.02 * m_flAccuracy, flCycleTime, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user