Skip to content

Commit

Permalink
func_breakable shouldn't take damage when it's set to Trigger Only
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeSlave committed Aug 15, 2024
1 parent 0d6fd0b commit 87b8c1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dlls/func_break.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,8 @@ int CBreakable::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, flo
g_vecAttackDir = vecTemp.Normalize();

// do the damage
pev->health -= flDamage;
if( pev->takedamage )
pev->health -= flDamage;
if( pev->health <= 0 )
{
Killed( pevAttacker, GIB_NORMAL );
Expand Down

0 comments on commit 87b8c1c

Please sign in to comment.