mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
Merge branch 'enchanting' into 'master'
Reset enchant effects displayed range when they are constant (bug #5603) See merge request OpenMW/openmw!309
This commit is contained in:
commit
0438d9d5bb
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 #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…
Reference in a new issue