File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/game/server/tf/player_vs_environment Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -519,6 +519,8 @@ int CTFBaseBoss::OnTakeDamage_Alive( const CTakeDamageInfo &rawInfo )
519519 gameeventmanager->FireEvent ( event );
520520 }
521521
522+ int iPrevHealth = GetHealth ();
523+
522524 int result = BaseClass::OnTakeDamage_Alive ( info );
523525
524526 // emit injury outputs
@@ -570,6 +572,12 @@ int CTFBaseBoss::OnTakeDamage_Alive( const CTakeDamageInfo &rawInfo )
570572 pAttacker->OnDealtDamage ( this , info );
571573
572574 CTF_GameStats.Event_BossDamage ( pAttacker, info.GetDamage () );
575+
576+ // Give crit chance from damage
577+ if ( rawInfo.GetAttacker () != this )
578+ {
579+ pAttacker->RecordDamageEvent ( info, GetHealth () <= 0 , iPrevHealth );
580+ }
573581 }
574582
575583 return result;
You can’t perform that action at this time.
0 commit comments