Skip to content

Commit

Permalink
Merge branch 'Toodles2You-func-pushable-crowbar'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelTroch committed Aug 12, 2024
2 parents abbf918 + 484911d commit 97b7249
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Fixed potential buffer overflows in text localization (Thanks OMAM)
* Reset frame to 0 when grenade bounces [#238](https://github.com/twhl-community/halflife-updated/issues/238) (thanks FreeSlave)
* Fix weapon events not treating pushable objects as BSP models [#220](https://github.com/twhl-community/halflife-updated/pull/220) (Thanks Toodles2You)
* Fixed crowbar applying breakable glass decals to unbreakable pushable objects [#219](https://github.com/twhl-community/halflife-updated/pull/219) (Thanks Toodles2You)

## Changes in V1.0.0

Expand Down
1 change: 1 addition & 0 deletions FULL_UPDATED_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Fixes for bugs introduced in beta builds are not included in this list.
* Fixed crowbar not showing in weapon list if there are empty weapon slots with a lower id (halflife [#3181](https://github.com/ValveSoftware/halflife/issues/3181))
* Fixed the Crowbar damage always being calculated halved (halflife issue [#1600](https://github.com/ValveSoftware/halflife/pull/1600) (Thanks YaLTeR)
* Fixed Crowbar playing back swing events twice sometimes (halflife issue [#3230](https://github.com/ValveSoftware/halflife/issues/3230))
* Fixed crowbar applying breakable glass decals to unbreakable pushable objects [#219](https://github.com/twhl-community/halflife-updated/pull/219) (Thanks Toodles2You)

### Glock

Expand Down
10 changes: 10 additions & 0 deletions dlls/func_break.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,8 @@ class CPushable : public CBreakable
// breakables use an overridden takedamage
bool TakeDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType) override;

int DamageDecal(int bitsDamageType) override;

static TYPEDESCRIPTION m_SaveData[];

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

return true;
}

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

return CBaseEntity::DamageDecal(bitsDamageType);
}

0 comments on commit 97b7249

Please sign in to comment.