Skip to content

Commit

Permalink
Fix infected player could fire as human during the tick of infection
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaffeine committed Aug 27, 2024
1 parent 0fc60c9 commit 051acd5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/game/server/infclass/classes/humans/human.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,12 @@ void CInfClassHuman::HandleNinja()

void CInfClassHuman::OnWeaponFired(WeaponFireContext *pFireContext)
{
if(m_pPlayer->IsInfectionStarted())
{
pFireContext->FireAccepted = false;
return;
}

const float ReloadIntervalModifier = m_WeaponReloadIntervalModifier[pFireContext->Weapon];
pFireContext->ReloadInterval *= ReloadIntervalModifier;

Expand Down

0 comments on commit 051acd5

Please sign in to comment.