1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

break invisibility first

This commit is contained in:
rexelion 2017-11-04 00:44:16 +00:00
parent bcbfa5fe1e
commit 8c2cc0f42f

View file

@ -653,14 +653,14 @@ namespace MWGui
if (object.getClass().getName(object) == "") // objects without name presented to user can never be picked up
return;
if (!object.getRefData().activate())
return;
int count = object.getRefData().getCount();
MWWorld::Ptr player = MWMechanics::getPlayer();
MWBase::Environment::get().getWorld()->breakInvisibility(player);
if (!object.getRefData().activate())
return;
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, object, MWWorld::Ptr(), count);
// add to player inventory