Skip to content

Commit

Permalink
Don't create infection death event for players already dead
Browse files Browse the repository at this point in the history
Fixes a crash with bots e4793ce introduced, but this just generally makes sense to check anyways
  • Loading branch information
Vauff committed Jan 15, 2025
1 parent e4793ce commit b04de82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/zombiereborn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,9 @@ void ZR_ApplyKnockbackExplosion(CBaseEntity* pProjectile, CCSPlayerPawn* pVictim

void ZR_FakePlayerDeath(CCSPlayerController* pAttackerController, CCSPlayerController* pVictimController, const char* szWeapon, bool bDontBroadcast)
{
if (!pVictimController->m_bPawnIsAlive())
return;

IGameEvent* pEvent = g_gameEventManager->CreateEvent("player_death");

if (!pEvent)
Expand Down

0 comments on commit b04de82

Please sign in to comment.