From 43ad9278178ed62c7ea09cc113ffdde3e4142a0a Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sat, 6 Aug 2022 20:12:23 +0300 Subject: [PATCH] Fix dead critters reload weapons when combat ends --- src/combat.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/combat.cc b/src/combat.cc index 8b51532..f49c5be 100644 --- a/src/combat.cc +++ b/src/combat.cc @@ -2665,7 +2665,10 @@ static void _combat_over() for (int index = 0; index < _list_com; index++) { Object* critter = _combat_list[index]; if (critter != gDude) { - _cai_attempt_w_reload(critter, 0); + // SFALL: Fix to prevent dead NPCs from reloading their weapons. + if ((critter->data.critter.combat.results & DAM_DEAD) == 0) { + _cai_attempt_w_reload(critter, 0); + } } } }