From 1cda2beef743eb17f2bbecbe2d6e53c4dcaa562f Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Wed, 5 Oct 2022 13:26:13 +0300 Subject: [PATCH] Fix looting corpses with NoSteal flag --- src/actions.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/actions.cc b/src/actions.cc index 133c39e..7fedd25 100644 --- a/src/actions.cc +++ b/src/actions.cc @@ -1254,6 +1254,11 @@ int _action_loot_container(Object* critter, Object* container) return -1; } + // SFALL: Fix for trying to loot corpses with the "NoSteal" flag. + if (_critter_flag_check(container->pid, CRITTER_NO_STEAL)) { + return -1; + } + if (critter == gDude) { int anim = FID_ANIM_TYPE(gDude->fid); if (anim == ANIM_WALK || anim == ANIM_RUNNING) {