Merge branch 'rangingareas' into 'master'

Don't apply area of effect for potions and improve range handling

Closes #8018

See merge request OpenMW/openmw!4172
pull/3236/head
psi29a 7 months ago
commit 05a70b29c5

@ -180,6 +180,7 @@
Bug #7993: Cannot load Bloodmoon without Tribunal
Bug #7997: Can toggle perspective when paralyzed
Bug #8002: Portable light sources held by creatures do not emit lighting
Bug #8018: Potion effects should never explode and always apply on self
Feature #1415: Infinite fall failsafe
Feature #2566: Handle NAM9 records for manual cell references
Feature #3537: Shader-based water ripples

@ -52,6 +52,8 @@ namespace
{
for (const auto& enam : list.mList)
{
if (enam.mData.mRange != ESM::RT_Self)
continue;
ESM::ActiveEffect effect;
effect.mEffectId = enam.mData.mEffectID;
effect.mArg = MWMechanics::EffectKey(enam.mData).mArg;

@ -379,7 +379,10 @@ namespace MWMechanics
mFlags = static_cast<ESM::ActiveSpells::Flags>(
ESM::ActiveSpells::Flag_Temporary | ESM::ActiveSpells::Flag_Stackable);
inflict(mCaster, potion->mEffects, ESM::RT_Self);
// Ignore range and don't apply area of effect
inflict(mCaster, potion->mEffects, ESM::RT_Self, true);
inflict(mCaster, potion->mEffects, ESM::RT_Touch, true);
inflict(mCaster, potion->mEffects, ESM::RT_Target, true);
return true;
}

Loading…
Cancel
Save