alliedmodders / amxmodx

AMX Mod X - Half-Life 1 Scripting and Administration
http://www.amxmodx.org/
489 stars 197 forks source link

Ham_TakeDamage doesn't make damage to target behind the wall #1054

Open r4sas opened 2 years ago

r4sas commented 2 years ago

Help us help you

Environment

Description

Ham_TakeDamage doesn't make damage to player when it is triggered with entity (custom grenade) and the target is behind the wall (in range of damage).

Problematic Code (or Steps to Reproduce)

while((victim = engfunc(EngFunc_FindEntityInSphere, victim, flOrigin, g_Radius)) != 0) {
    if(pev(victim, pev_takedamage) == DAMAGE_NO || !is_user_alive(victim) || victim == id)
        continue;

    ExecuteHamB(Ham_TakeDamage, victim, ent, id, g_CustomDamage, DMG_GRENADE);
}

Usage of ReAPI with rg_multidmg_clear, rg_multidmg_add, rg_multidmg_apply makes damage as it supposed to do.

Logs

justgo97 commented 2 years ago

try changing mp_hegrenade_penetration

r4sas commented 2 years ago

Tried already, nothing changes.