1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 22:20:33 +00:00

Remove unused variable

This commit is contained in:
Evil Eye 2022-03-27 17:20:22 +02:00
parent 2b83df09b6
commit 7695f03c4c
2 changed files with 0 additions and 26 deletions

View File

@ -597,28 +597,6 @@ namespace MWMechanics
mAiSequence.readState(state.mAiSequence);
mMagicEffects.readState(state.mMagicEffects);
// Rebuild the bound item cache
for(int effectId = ESM::MagicEffect::BoundDagger; effectId <= ESM::MagicEffect::BoundGloves; effectId++)
{
if(mMagicEffects.get(effectId).getMagnitude() > 0)
mBoundItems.insert(effectId);
else
{
// Check active spell effects
// We can't use mActiveSpells::getMagicEffects here because it doesn't include expired effects
auto spell = std::find_if(mActiveSpells.begin(), mActiveSpells.end(), [&] (const auto& spell)
{
const auto& effects = spell.getEffects();
return std::find_if(effects.begin(), effects.end(), [&] (const auto& effect)
{
return effect.mEffectId == effectId;
}) != effects.end();
});
if(spell != mActiveSpells.end())
mBoundItems.insert(effectId);
}
}
mSummonedCreatures = state.mSummonedCreatures;
mSummonGraveyard = state.mSummonGraveyard;

View File

@ -261,10 +261,6 @@ namespace MWMechanics
void setHitAttemptActorId(const int actorId);
int getHitAttemptActorId() const;
// Note, this is just a cache to avoid checking the whole container store every frame. We don't need to store it in saves.
// TODO: Put it somewhere else?
std::set<int> mBoundItems;
void writeState (ESM::CreatureStats& state) const;
void readState (const ESM::CreatureStats& state);