From c405e6296be2220918ad01b575e09877cabd9c89 Mon Sep 17 00:00:00 2001 From: jhh8 Date: Tue, 13 Jan 2026 22:14:09 +0200 Subject: [PATCH] make damage numbers affected after ontakedamage_alive_any vscript hook looks at current health compared to previous health to check damage --- src/game/shared/swarm/asw_util_shared.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/shared/swarm/asw_util_shared.cpp b/src/game/shared/swarm/asw_util_shared.cpp index 626236fcd..cc7483dd2 100644 --- a/src/game/shared/swarm/asw_util_shared.cpp +++ b/src/game/shared/swarm/asw_util_shared.cpp @@ -738,7 +738,8 @@ void UTIL_RD_HitConfirm( CBaseEntity *pTarget, int iHealthBefore, const CTakeDam bool bDamageOverTime = info.GetDamageType() & DMG_DIRECT; bool bBlastDamage = info.GetDamageType() & DMG_BLAST; Disposition_t iDisposition = pInhabitableAttacker && pTarget ? pInhabitableAttacker->IRelationType( pTarget ) : D_HT; - float flDamage = MIN( info.GetDamage(), iHealthBefore ); + int iHealth = pTarget ? pTarget->GetHealth() : 0; + float flDamage = MIN( iHealthBefore - iHealth, iHealthBefore ); UserMessageBegin( filter, "RDHitConfirm" ); WRITE_ENTITY( pAttacker ? pAttacker->entindex() : -1 );