diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index 34762de5a..51bdd97f9 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -354,22 +354,25 @@ namespace MWGui void ToolTips::checkOwned() { - MWBase::WindowManager *wm = MWBase::Environment::get().getWindowManager(); - - if(!mFocusObject.isEmpty()) + if(Settings::Manager::getBool("show owned", "Game")) { - MWWorld::CellRef& cellref = mFocusObject.getCellRef(); - MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPlayerPtr(); - MWWorld::Ptr victim; + MWBase::WindowManager *wm = MWBase::Environment::get().getWindowManager(); - MWMechanics::MechanicsManager* mm = new MWMechanics::MechanicsManager; - bool allowed = mm->isAllowedToUse(ptr, cellref, victim); // 0 - owned, 1 - not owned + if(!mFocusObject.isEmpty()) + { + MWWorld::CellRef& cellref = mFocusObject.getCellRef(); + MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPlayerPtr(); + MWWorld::Ptr victim; + + MWMechanics::MechanicsManager* mm = new MWMechanics::MechanicsManager; + bool allowed = mm->isAllowedToUse(ptr, cellref, victim); // 0 - owned, 1 - not owned - wm->setCrosshairOwned(!allowed); - } - else - { - wm->setCrosshairOwned(false); + wm->setCrosshairOwned(!allowed); + } + else + { + wm->setCrosshairOwned(false); + } } } diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 0581d7356..4ec0c2480 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -162,6 +162,9 @@ best attack = false difficulty = 0 +# change crosshair color when pointing on owned object +show owned = false + [Saves] character = # Save when resting