diff --git a/Hitmarker/scripting/Hitmarker.sp b/Hitmarker/scripting/Hitmarker.sp index b1fd747f..c06a90d0 100644 --- a/Hitmarker/scripting/Hitmarker.sp +++ b/Hitmarker/scripting/Hitmarker.sp @@ -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);