mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-08-05 16:26:46 -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 mUpdatedHitOverlay = false;
|
||||||
bool mUpdateSpellWindow = false;
|
bool mUpdateSpellWindow = false;
|
||||||
bool mPlayNonLooping = false;
|
bool mPlayNonLooping = false;
|
||||||
|
bool mEraseRemoved = false;
|
||||||
bool mUpdate;
|
bool mUpdate;
|
||||||
|
|
||||||
UpdateContext(bool update)
|
UpdateContext(bool update)
|
||||||
@ -327,6 +328,7 @@ namespace MWMechanics
|
|||||||
|
|
||||||
const MWWorld::Ptr player = MWMechanics::getPlayer();
|
const MWWorld::Ptr player = MWMechanics::getPlayer();
|
||||||
// Update effects
|
// Update effects
|
||||||
|
context.mEraseRemoved = true;
|
||||||
for (auto spellIt = mSpells.begin(); spellIt != mSpells.end();)
|
for (auto spellIt = mSpells.begin(); spellIt != mSpells.end();)
|
||||||
{
|
{
|
||||||
updateActiveSpell(ptr, duration, spellIt, context);
|
updateActiveSpell(ptr, duration, spellIt, context);
|
||||||
@ -411,6 +413,8 @@ namespace MWMechanics
|
|||||||
if (removedSpell)
|
if (removedSpell)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (context.mEraseRemoved)
|
||||||
|
{
|
||||||
bool remove = false;
|
bool remove = false;
|
||||||
if (spellIt->hasFlag(ESM::ActiveSpells::Flag_SpellStore))
|
if (spellIt->hasFlag(ESM::ActiveSpells::Flag_SpellStore))
|
||||||
{
|
{
|
||||||
@ -451,6 +455,7 @@ namespace MWMechanics
|
|||||||
context.mUpdateSpellWindow = true;
|
context.mUpdateSpellWindow = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
++spellIt;
|
++spellIt;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user