mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-28 19:21:04 +00:00
Merge branch 'bound_no_more' into 'master'
Remove unused variable See merge request OpenMW/openmw!1728
This commit is contained in:
commit
f992d10c6a
@ -597,28 +597,6 @@ namespace MWMechanics
|
|||||||
mAiSequence.readState(state.mAiSequence);
|
mAiSequence.readState(state.mAiSequence);
|
||||||
mMagicEffects.readState(state.mMagicEffects);
|
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;
|
mSummonedCreatures = state.mSummonedCreatures;
|
||||||
mSummonGraveyard = state.mSummonGraveyard;
|
mSummonGraveyard = state.mSummonGraveyard;
|
||||||
|
|
||||||
|
@ -261,10 +261,6 @@ namespace MWMechanics
|
|||||||
void setHitAttemptActorId(const int actorId);
|
void setHitAttemptActorId(const int actorId);
|
||||||
int getHitAttemptActorId() const;
|
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 writeState (ESM::CreatureStats& state) const;
|
||||||
|
|
||||||
void readState (const ESM::CreatureStats& state);
|
void readState (const ESM::CreatureStats& state);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user