Skip to content

Commit 34a9526

Browse files
authored
Merge pull request #1014 from ReactiveDrop/damagenumbers-vscript
make damage numbers affected after ontakedamage_alive_any vscript hook
2 parents 71a3d11 + c405e62 commit 34a9526

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/game/shared/swarm/asw_util_shared.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,8 @@ void UTIL_RD_HitConfirm( CBaseEntity *pTarget, int iHealthBefore, const CTakeDam
738738
bool bDamageOverTime = info.GetDamageType() & DMG_DIRECT;
739739
bool bBlastDamage = info.GetDamageType() & DMG_BLAST;
740740
Disposition_t iDisposition = pInhabitableAttacker && pTarget ? pInhabitableAttacker->IRelationType( pTarget ) : D_HT;
741-
float flDamage = MIN( info.GetDamage(), iHealthBefore );
741+
int iHealth = pTarget ? pTarget->GetHealth() : 0;
742+
float flDamage = MIN( iHealthBefore - iHealth, iHealthBefore );
742743

743744
UserMessageBegin( filter, "RDHitConfirm" );
744745
WRITE_ENTITY( pAttacker ? pAttacker->entindex() : -1 );

0 commit comments

Comments
 (0)