Reset frame to 0 when grenade bounces

Fixes #238, thanks @FreeSlave
This commit is contained in:
Joël Troch 2024-08-12 19:42:56 +02:00
parent afabe33935
commit b31de2b7ae
3 changed files with 5 additions and 0 deletions

View file

@ -7,6 +7,7 @@
### Bug Fixes ### Bug Fixes
* Fixed potential buffer overflows in text localization (Thanks OMAM) * 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 ## Changes in V1.0.0

View file

@ -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 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 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) * 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 ### Satchel charge

View file

@ -283,7 +283,10 @@ void CGrenade::BounceTouch(CBaseEntity* pOther)
if (pev->framerate > 1.0) if (pev->framerate > 1.0)
pev->framerate = 1; pev->framerate = 1;
else if (pev->framerate < 0.5) else if (pev->framerate < 0.5)
{
pev->framerate = 0; pev->framerate = 0;
pev->frame = 0;
}
} }