From b31de2b7aee9bb53d07671a8187daf18449a045c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Troch?= Date: Mon, 12 Aug 2024 19:42:56 +0200 Subject: [PATCH] Reset frame to 0 when grenade bounces Fixes #238, thanks @FreeSlave --- CHANGELOG.md | 1 + FULL_UPDATED_CHANGELOG.md | 1 + dlls/ggrenade.cpp | 3 +++ 3 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07c02fa..8040a16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/FULL_UPDATED_CHANGELOG.md b/FULL_UPDATED_CHANGELOG.md index 391e751..c999562 100644 --- a/FULL_UPDATED_CHANGELOG.md +++ b/FULL_UPDATED_CHANGELOG.md @@ -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 diff --git a/dlls/ggrenade.cpp b/dlls/ggrenade.cpp index 9e9891c..b9958f6 100644 --- a/dlls/ggrenade.cpp +++ b/dlls/ggrenade.cpp @@ -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; + } }