Merge pull request #340 from BenCat07/patch-6

Fix se_shoot not working on flaregun
This commit is contained in:
nullifiedcat 2018-01-26 19:40:01 +03:00 committed by GitHub
commit 6f453b44ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,8 +158,10 @@ void CreateMove()
amount = 2 * 90;
}
}
else if (CanShoot() && bIsHolding && !bWasHolding)
amount = 1 * 90;
else if (CanShoot() && bIsHolding && !bWasHolding && g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlareGun))
amount = 1 * 90;
else if (CanShoot() && bIsHolding && !bWasHolding && g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFFlareGun))
amount = 2 * 90;
else if (bWasHolding && !bIsHolding)
amount = 1 * 90;
@ -172,8 +174,10 @@ void CreateMove()
{
if (not g_pLocalPlayer->holding_sniper_rifle)
{
if (CanShoot() && bIsHolding && !bWasHolding)
if (CanShoot() && bIsHolding && !bWasHolding && g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlareGun))
amount = 1 * 90;
else if (CanShoot() && bIsHolding && !bWasHolding && g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFFlareGun))
amount = 2 * 90;
else if (bWasHolding && !bIsHolding)
amount = 1 * 90;
bWasHolding = (g_pUserCmd->buttons & IN_ATTACK) ||