Hitmarker: check if health != 0
This commit is contained in:
parent
a79b9d389f
commit
88f9a3507c
@ -43,7 +43,7 @@ public Plugin myinfo =
|
||||
name = "Hitmarker",
|
||||
author = "Neon & Nano",
|
||||
description = "Players can enable or disable their hitmarkers while shooting zombies or bosses",
|
||||
version = "3.0.0",
|
||||
version = "3.0.1",
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -450,6 +450,10 @@ public void OnBossDamaged(CBoss Boss, CConfig Config, int client, float damage)
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public MRESReturn Detour_OnTakeDamage(int entity, Handle hReturn, Handle hParams)
|
||||
{
|
||||
int iHealth = GetEntProp(entity, Prop_Data, "m_iHealth");
|
||||
if (!iHealth)
|
||||
return MRES_Ignored;
|
||||
|
||||
int client = DHookGetParamObjectPtrVar(hParams, 1, 3*(3*4) + 0, ObjectValueType_Ehandle);
|
||||
//https://github.com/alliedmodders/hl2sdk/blob/css/game/shared/takedamageinfo.h#L115
|
||||
//float dmg = DHookGetParamObjectPtrVar(hParams, 1, 48, ObjectValueType_Float);
|
||||
|
Loading…
Reference in New Issue
Block a user