diff --git a/CHANGELOG.md b/CHANGELOG.md index 86ba74cce9..4f314a11c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -144,6 +144,7 @@ Bug #6901: Morrowind.exe soul gem usage discrepancy Bug #6909: Using enchanted items has no animation Bug #6910: Torches should not be extinguished when not being held + Bug #6913: Constant effect enchanted items don't break invisibility Feature #890: OpenMW-CS: Column filtering Feature #1465: "Reset" argument for AI functions Feature #2491: Ability to make OpenMW "portable" diff --git a/apps/openmw/mwmechanics/activespells.cpp b/apps/openmw/mwmechanics/activespells.cpp index e03947d7fc..148d0e11cc 100644 --- a/apps/openmw/mwmechanics/activespells.cpp +++ b/apps/openmw/mwmechanics/activespells.cpp @@ -219,6 +219,9 @@ namespace MWMechanics return params.mSlot == slotIndex && params.mType == ESM::ActiveSpells::Type_Enchantment && params.mId == slot->getCellRef().getRefId(); }) != mSpells.end()) continue; + // world->breakInvisibility leads to a stack overflow as it calls this method so just break invisibility manually + purgeEffect(ptr, ESM::MagicEffect::Invisibility); + applyPurges(ptr); const ActiveSpellParams& params = mSpells.emplace_back(ActiveSpellParams{*slot, enchantment, slotIndex, ptr}); for(const auto& effect : params.mEffects) MWMechanics::playEffects(ptr, *world->getStore().get().find(effect.mEffectId), playNonLooping);