Skip to content

Commit

Permalink
Fix crowbar applying breakable glass decals to unbreakable pushable o…
Browse files Browse the repository at this point in the history
…bjects (#504)
  • Loading branch information
FreeSlave authored Jan 2, 2025
1 parent 1a4d59f commit 75b38fc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dlls/func_break.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,8 @@ class CPushable : public CBreakable
// breakables use an overridden takedamage
virtual int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType );

int DamageDecal(int bitsDamageType);

static TYPEDESCRIPTION m_SaveData[];

static const char *m_soundNames[3];
Expand Down Expand Up @@ -1044,3 +1046,11 @@ int CPushable::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, floa

return 1;
}

int CPushable::DamageDecal(int bitsDamageType)
{
if (FBitSet(pev->spawnflags, SF_PUSH_BREAKABLE))
return CBreakable::DamageDecal(bitsDamageType);

return CBaseEntity::DamageDecal(bitsDamageType);
}

0 comments on commit 75b38fc

Please sign in to comment.