mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
break invisibility first
This commit is contained in:
parent
bcbfa5fe1e
commit
8c2cc0f42f
1 changed files with 3 additions and 3 deletions
|
@ -653,14 +653,14 @@ namespace MWGui
|
||||||
if (object.getClass().getName(object) == "") // objects without name presented to user can never be picked up
|
if (object.getClass().getName(object) == "") // objects without name presented to user can never be picked up
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!object.getRefData().activate())
|
|
||||||
return;
|
|
||||||
|
|
||||||
int count = object.getRefData().getCount();
|
int count = object.getRefData().getCount();
|
||||||
|
|
||||||
MWWorld::Ptr player = MWMechanics::getPlayer();
|
MWWorld::Ptr player = MWMechanics::getPlayer();
|
||||||
MWBase::Environment::get().getWorld()->breakInvisibility(player);
|
MWBase::Environment::get().getWorld()->breakInvisibility(player);
|
||||||
|
|
||||||
|
if (!object.getRefData().activate())
|
||||||
|
return;
|
||||||
|
|
||||||
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, object, MWWorld::Ptr(), count);
|
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, object, MWWorld::Ptr(), count);
|
||||||
|
|
||||||
// add to player inventory
|
// add to player inventory
|
||||||
|
|
Loading…
Reference in a new issue