Hitmarker: check if health != 0
This commit is contained in:
parent
be1d9b84b5
commit
f0d6326c39
@ -43,7 +43,7 @@ public Plugin myinfo =
|
|||||||
name = "Hitmarker",
|
name = "Hitmarker",
|
||||||
author = "Neon & Nano",
|
author = "Neon & Nano",
|
||||||
description = "Players can enable or disable their hitmarkers while shooting zombies or bosses",
|
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)
|
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);
|
int client = DHookGetParamObjectPtrVar(hParams, 1, 3*(3*4) + 0, ObjectValueType_Ehandle);
|
||||||
//https://github.com/alliedmodders/hl2sdk/blob/css/game/shared/takedamageinfo.h#L115
|
//https://github.com/alliedmodders/hl2sdk/blob/css/game/shared/takedamageinfo.h#L115
|
||||||
//float dmg = DHookGetParamObjectPtrVar(hParams, 1, 48, ObjectValueType_Float);
|
//float dmg = DHookGetParamObjectPtrVar(hParams, 1, 48, ObjectValueType_Float);
|
||||||
|
Loading…
Reference in New Issue
Block a user