From f5c5ebc1dc18315b6840e6a2901d6bc6d79633e8 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sat, 18 Feb 2023 15:30:02 +0100 Subject: [PATCH] Prevent consumption of ingredients that don't have a first effect --- CHANGELOG.md | 1 + apps/openmw/mwclass/ingredient.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb9c304e30..2f977ad692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ Bug #7088: Deleting last save game of last character doesn't clear character name/details Bug #7092: BSA archives from higher priority directories don't take priority Bug #7122: Teleportation to underwater should cancel active water walking effect + Bug #7163: Myar Aranath: Wheat breaks the GUI Bug #7172: Current music playlist continues playing indefinitely if next playlist is empty Feature #5492: Let rain and snow collide with statics Feature #6447: Add LOD support to Object Paging diff --git a/apps/openmw/mwclass/ingredient.cpp b/apps/openmw/mwclass/ingredient.cpp index 6be431038a..7fab60392a 100644 --- a/apps/openmw/mwclass/ingredient.cpp +++ b/apps/openmw/mwclass/ingredient.cpp @@ -12,6 +12,7 @@ #include "../mwworld/actioneat.hpp" #include "../mwworld/cellstore.hpp" #include "../mwworld/esmstore.hpp" +#include "../mwworld/nullaction.hpp" #include "../mwworld/ptr.hpp" #include "../mwgui/tooltips.hpp" @@ -72,6 +73,8 @@ namespace MWClass std::unique_ptr Ingredient::use(const MWWorld::Ptr& ptr, bool force) const { + if (ptr.get()->mBase->mData.mEffectID[0] < 0) + return std::make_unique(); std::unique_ptr action = std::make_unique(ptr); action->setSound(ESM::RefId::stringRefId("Swallow"));