Skip to content

Commit

Permalink
Reset frame to 0 when grenade bounces
Browse files Browse the repository at this point in the history
Fixes #238, thanks @FreeSlave
  • Loading branch information
JoelTroch committed Aug 12, 2024
1 parent afabe33 commit b31de2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Bug Fixes

* 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)

## 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 @@ -116,6 +116,7 @@ Fixes for bugs introduced in beta builds are not included in this list.
* Fixed Hand grenade not playing deploy animation after finishing a throw (halflife issue [#2495](https://github.com/ValveSoftware/halflife/issues/2495))
* Fixed Hand grenades staying primed when switching away or dropping the weapon (halflife issue [#3251](https://github.com/ValveSoftware/halflife/issues/3251))
* Fixed hand grenade animations not playing correctly [#209](https://github.com/twhl-community/halflife-updated/pull/209) (Thanks Toodles2You)
* Reset frame to 0 when grenade bounces [#238](https://github.com/twhl-community/halflife-updated/issues/238) (thanks FreeSlave)

### Satchel charge

Expand Down
3 changes: 3 additions & 0 deletions dlls/ggrenade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ void CGrenade::BounceTouch(CBaseEntity* pOther)
if (pev->framerate > 1.0)
pev->framerate = 1;
else if (pev->framerate < 0.5)
{
pev->framerate = 0;
pev->frame = 0;
}
}


Expand Down

0 comments on commit b31de2b

Please sign in to comment.