forked from mirror/openmw-tes3mp
Security fixes
This commit is contained in:
parent
2715520d6f
commit
d9dd02c610
2 changed files with 4 additions and 1 deletions
|
@ -14,6 +14,7 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
|
|
||||||
Security::Security(const MWWorld::Ptr &actor)
|
Security::Security(const MWWorld::Ptr &actor)
|
||||||
|
: mActor(actor)
|
||||||
{
|
{
|
||||||
CreatureStats& creatureStats = MWWorld::Class::get(actor).getCreatureStats(actor);
|
CreatureStats& creatureStats = MWWorld::Class::get(actor).getCreatureStats(actor);
|
||||||
NpcStats& npcStats = MWWorld::Class::get(actor).getNpcStats(actor);
|
NpcStats& npcStats = MWWorld::Class::get(actor).getNpcStats(actor);
|
||||||
|
|
|
@ -179,7 +179,9 @@ namespace MWWorld
|
||||||
|
|
||||||
// tool used up?
|
// tool used up?
|
||||||
if (!item.getRefData().getCount())
|
if (!item.getRefData().getCount())
|
||||||
MWBase::Environment::get().getWindowManager()->setSelectedWeapon(MWWorld::Ptr());
|
MWBase::Environment::get().getWindowManager()->unsetSelectedWeapon();
|
||||||
|
else
|
||||||
|
MWBase::Environment::get().getWindowManager()->setSelectedWeapon(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue