1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 19:53:53 +00:00

(#1191) Disallow picking up if inventory disabled

Check if window manager has allowed the inventory window
if not, then items should not be possible to pick up
This commit is contained in:
Sandy Carter 2014-03-08 13:45:54 -05:00
parent 072dc6d438
commit 72a3c50eb8

View file

@ -514,6 +514,9 @@ namespace MWGui
void InventoryWindow::pickUpObject (MWWorld::Ptr object)
{
// If the inventory is not yet enabled, don't pick anything up
if (!MWBase::Environment::get().getWindowManager()->isAllowed(GW_Inventory))
return;
// make sure the object is of a type that can be picked up
std::string type = object.getTypeName();
if ( (type != typeid(ESM::Apparatus).name())