amxmodx
amxmodx copied to clipboard
Ham_TakeDamage doesn't make damage to target behind the wall
Help us help you
- [x] I have checked that my issue doesn't exist yet.
- [x] I have tried my absolute best to reduce the problem-space and have provided the absolute smallest test-case possible.
- [x] I can always reproduce the issue with the provided description below.
Environment
- Operating System version: Debian 9
- Game/AppID (with version if applicable): CS 1.6, ReHLDS 3.10.0.761-dev, ReGameDLL 5.21.0.534-dev
- Current AMX Mod X version: 1.9.0.5263
- Current Metamod version: Metamod-r v1.3.0.128, API (5:13)
- [ ] I have updated AMX Mod X to the latest version and it still happens.
- [ ] I have updated AMX Mod X to the latest snapshot and it still happens.
- [ ] I have updated Metamod to the latest version and it still happens.
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
- Please attach in separate files: game output, library logs, kernel logs, and any other supporting information.
- In case of a crash, please attach minidump or dump analyze output.
try changing mp_hegrenade_penetration
Tried already, nothing changes.