mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 18:32:36 +00:00
Reset enchant effects displayed range when they are constant (bug #5603)
This commit is contained in:
parent
acdf4cb5e3
commit
f2af957647
@ -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 #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher
|
||||
|
@ -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…
x
Reference in New Issue
Block a user