diff --git a/dlls/func_break.cpp b/dlls/func_break.cpp index cfd192ba0..d2cee89d2 100644 --- a/dlls/func_break.cpp +++ b/dlls/func_break.cpp @@ -796,6 +796,14 @@ int CBreakable::DamageDecal(int bitsDamageType) return CBaseEntity::DamageDecal(bitsDamageType); } +bool CBreakable::ReflectGauss() +{ + if (IsBreakable()) + return false; + + return CBaseEntity::ReflectGauss(); +} + class CPushable : public CBreakable { @@ -813,6 +821,8 @@ class CPushable : public CBreakable bool Save(CSave& save) override; bool Restore(CRestore& restore) override; + bool ReflectGauss() override; + inline float MaxSpeed() { return m_maxSpeed; } // breakables use an overridden takedamage @@ -1023,3 +1033,11 @@ bool CPushable::TakeDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, floa return true; } + +bool CPushable::ReflectGauss() +{ + if (!FBitSet(pev->spawnflags, SF_PUSH_BREAKABLE)) + return true; + + return CBreakable::ReflectGauss(); +} diff --git a/dlls/func_break.h b/dlls/func_break.h index cbedd0b04..878e001e0 100644 --- a/dlls/func_break.h +++ b/dlls/func_break.h @@ -63,6 +63,8 @@ class CBreakable : public CBaseDelay bool Save(CSave& save) override; bool Restore(CRestore& restore) override; + bool ReflectGauss() override; + inline bool Explodable() { return ExplosionMagnitude() > 0; } inline int ExplosionMagnitude() { return pev->impulse; } inline void ExplosionSetMagnitude(int magnitude) { pev->impulse = magnitude; }