Merge branch 'bound_no_more' into 'master'

Remove unused variable

See merge request OpenMW/openmw!1728
pull/3226/head
psi29a 3 years ago
commit f992d10c6a

@ -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;

@ -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);

Loading…
Cancel
Save