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

Merge branch 'bound_no_more' into 'master'

Remove unused variable

See merge request OpenMW/openmw!1728
This commit is contained in:
psi29a 2022-03-28 11:38:50 +00:00
commit f992d10c6a
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);