1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:59:57 +00:00

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

This commit is contained in:
Evil Eye 2024-06-13 18:00:44 +02:00
parent b001deeff7
commit a934902f12
3 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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;

View file

@ -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;
}