Skip to content

Commit 69b0dd4

Browse files
committed
fix #414 nullify the damage
1 parent 4683b77 commit 69b0dd4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cs2fixes.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,11 @@ bool CS2Fixes::Hook_OnTakeDamage_Alive(CTakeDamageResult* pDamageResult)
11191119
CCSPlayerPawn* pPawn = META_IFACEPTR(CCSPlayerPawn);
11201120

11211121
if (g_cvarEnableZR.Get() && ZR_Hook_OnTakeDamage_Alive(pDamageResult->m_pOriginatingInfo, pPawn))
1122+
{
1123+
pDamageResult->m_bWasDamageSuppressed = true;
1124+
pDamageResult->m_nDamageDealt = 0;
11221125
RETURN_META_VALUE(MRES_SUPERCEDE, false);
1126+
}
11231127

11241128
// This is a shit place to be doing this, but player_death event is too late and there is no pre-hook alternative
11251129
// Check if this is going to kill the player

0 commit comments

Comments
 (0)