From ea92da29328eadb68632833a20644df7239d1cee Mon Sep 17 00:00:00 2001 From: Sam V Date: Wed, 8 Nov 2023 14:54:28 +0100 Subject: [PATCH] Add missing check to see if allied grunt has weapons before flagging self as needing to reload --- CHANGELOG.md | 1 + dlls/hgrunt_ally.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e55e013f..63a3c49a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ * Fixed crash when +USEing NPCs that have just exited a scripted sequence (Thanks malortie) * Fixed ally grunt monsters resetting other ally grunt monsters' dying schedule if they are both killed at the same time (Thanks FreeSlave) * Minor fixes to switch statements to fix incorrect fallthrough +* Added missing check to see if allied grunt has weapons before flagging self as needing to reload (Thanks FreeSlave) ## Changes in V1.0.0 Release Candidate 002 diff --git a/dlls/hgrunt_ally.cpp b/dlls/hgrunt_ally.cpp index f3024033..c331ce36 100644 --- a/dlls/hgrunt_ally.cpp +++ b/dlls/hgrunt_ally.cpp @@ -878,7 +878,7 @@ void CHGruntAlly::IdleSound() //========================================================= void CHGruntAlly::CheckAmmo() { - if (m_cAmmoLoaded <= 0) + if (pev->weapons != 0 && m_cAmmoLoaded <= 0) { SetConditions(bits_COND_NO_AMMO_LOADED); }