Skip to content

Commit 72c5a92

Browse files
authored
Fix #4482 (onPlayerWasted not trigerring with setElementHealth to 0) (#4486)
Fix #4482 - onPlayerWasted not trigerring with setElementHealth to 0 (server-side)
1 parent 6f58ebf commit 72c5a92

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,8 @@ bool CStaticFunctionDefinitions::SetElementHealth(CElement* pElement, float fHea
17621762

17631763
if (pPed->IsDead() && fHealth > 0.0f)
17641764
pPed->SetIsDead(false);
1765+
else if (fHealth <= 0.0f && !pPed->IsDead())
1766+
KillPed(pElement, nullptr, 0xFF, 0xFF, false);
17651767

17661768
break;
17671769
}

0 commit comments

Comments
 (0)