Do not auto-equip items continuously

This was called every couple of frames.
This commit is contained in:
Emanuel Guevel 2013-08-07 14:30:13 +02:00
parent fd0a159a64
commit e0d0cdd18a
2 changed files with 0 additions and 10 deletions

View file

@ -36,12 +36,6 @@ namespace MWMechanics
} }
} }
void Actors::updateNpc (const MWWorld::Ptr& ptr, float duration, bool paused)
{
if (!paused && ptr.getRefData().getHandle()!="player")
MWWorld::Class::get (ptr).getInventoryStore (ptr).autoEquip (ptr);
}
void Actors::adjustMagicEffects (const MWWorld::Ptr& creature) void Actors::adjustMagicEffects (const MWWorld::Ptr& creature)
{ {
CreatureStats& creatureStats = MWWorld::Class::get (creature).getCreatureStats (creature); CreatureStats& creatureStats = MWWorld::Class::get (creature).getCreatureStats (creature);
@ -231,8 +225,6 @@ namespace MWMechanics
iter->second->resurrect(); iter->second->resurrect();
updateActor(iter->first, totalDuration); updateActor(iter->first, totalDuration);
if(iter->first.getTypeName() == typeid(ESM::NPC).name())
updateNpc(iter->first, totalDuration, paused);
if(!stats.isDead()) if(!stats.isDead())
continue; continue;

View file

@ -34,8 +34,6 @@ namespace MWMechanics
float mDuration; float mDuration;
void updateNpc (const MWWorld::Ptr& ptr, float duration, bool paused);
void adjustMagicEffects (const MWWorld::Ptr& creature); void adjustMagicEffects (const MWWorld::Ptr& creature);
void calculateDynamicStats (const MWWorld::Ptr& ptr); void calculateDynamicStats (const MWWorld::Ptr& ptr);