mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-08-03 15:27:13 -04:00
Only check for spelllist/equipment changes in the update loop
This commit is contained in:
parent
2dbe30ed5c
commit
c80b3d26b9
@ -79,6 +79,7 @@ namespace MWMechanics
|
||||
bool mUpdatedHitOverlay = false;
|
||||
bool mUpdateSpellWindow = false;
|
||||
bool mPlayNonLooping = false;
|
||||
bool mEraseRemoved = false;
|
||||
bool mUpdate;
|
||||
|
||||
UpdateContext(bool update)
|
||||
@ -327,6 +328,7 @@ namespace MWMechanics
|
||||
|
||||
const MWWorld::Ptr player = MWMechanics::getPlayer();
|
||||
// Update effects
|
||||
context.mEraseRemoved = true;
|
||||
for (auto spellIt = mSpells.begin(); spellIt != mSpells.end();)
|
||||
{
|
||||
updateActiveSpell(ptr, duration, spellIt, context);
|
||||
@ -411,6 +413,8 @@ namespace MWMechanics
|
||||
if (removedSpell)
|
||||
return true;
|
||||
|
||||
if (context.mEraseRemoved)
|
||||
{
|
||||
bool remove = false;
|
||||
if (spellIt->hasFlag(ESM::ActiveSpells::Flag_SpellStore))
|
||||
{
|
||||
@ -451,6 +455,7 @@ namespace MWMechanics
|
||||
context.mUpdateSpellWindow = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
++spellIt;
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user