Merge branch 'enchanting' into 'master'

Reset enchant effects displayed range when they are constant (bug #5603)

See merge request OpenMW/openmw!309
pull/593/head
psi29a 4 years ago
commit 0438d9d5bb

@ -47,6 +47,7 @@
Bug #5539: Window resize breaks when going from a lower resolution to full screen resolution
Bug #5548: Certain exhausted topics can be highlighted again even though there's no new dialogue
Bug #5557: Diagonal movement is noticeably slower with analogue stick
Bug #5603: Setting constant effect cast style doesn't correct effects view
Feature #390: 3rd person look "over the shoulder"
Feature #2386: Distant Statics in the form of Object Paging
Feature #4894: Consider actors as obstacles for pathfinding

@ -739,5 +739,24 @@ namespace MWGui
{
mAddEffectDialog.setConstantEffect(constant);
mConstantEffect = constant;
if (!constant)
return;
for (auto it = mEffects.begin(); it != mEffects.end();)
{
if (it->mRange != ESM::RT_Self)
{
auto& store = MWBase::Environment::get().getWorld()->getStore();
auto magicEffect = store.get<ESM::MagicEffect>().find(it->mEffectID);
if ((magicEffect->mData.mFlags & ESM::MagicEffect::CastSelf) == 0)
{
it = mEffects.erase(it);
continue;
}
it->mRange = ESM::RT_Self;
}
++it;
}
}
}

Loading…
Cancel
Save