Skip to content

Commit b88b486

Browse files
committed
Fix DamageMult for grenades
1 parent 4d3ce32 commit b88b486

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • amxmodx/scripting/Cwapi/Core/CWeapons

amxmodx/scripting/Cwapi/Core/CWeapons/Hooks.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,10 @@ public Hook_PlayerTakeDamage_Post(const VictimId, InflictorId, AttackerId, Float
370370
}
371371
Dbg_Log(" weaponObject = %d", weaponObject);
372372

373+
if (InflictorId != AttackerId) {
374+
fDamage *= weaponObject[CWeapon_DamageMult];
375+
}
376+
373377
CWeapons_Call(weaponObject, CWeapon_OnDamage, [weapon, itemIndex, VictimId, InflictorId, AttackerId, fDamage, iDamageBits]);
374378
if (Events_IsRet(CWAPI_STOP_MAIN)) {
375379
SetHookChainReturn(ATYPE_INTEGER, 0);

0 commit comments

Comments
 (0)