mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:23:53 +00:00
Reset enchant effects displayed range when they are constant (bug #5603)
This commit is contained in:
parent
acdf4cb5e3
commit
f2af957647
2 changed files with 20 additions and 0 deletions
|
@ -47,6 +47,7 @@
|
||||||
Bug #5539: Window resize breaks when going from a lower resolution to full screen resolution
|
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 #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 #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 #390: 3rd person look "over the shoulder"
|
||||||
Feature #2386: Distant Statics in the form of Object Paging
|
Feature #2386: Distant Statics in the form of Object Paging
|
||||||
Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher
|
Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher
|
||||||
|
|
|
@ -739,5 +739,24 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mAddEffectDialog.setConstantEffect(constant);
|
mAddEffectDialog.setConstantEffect(constant);
|
||||||
mConstantEffect = 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…
Reference in a new issue