crosshair owned - settings option

sceneinput
Jiří Kuneš 10 years ago
parent 66edae9b93
commit 15107ca5cf

@ -354,22 +354,25 @@ namespace MWGui
void ToolTips::checkOwned() void ToolTips::checkOwned()
{ {
MWBase::WindowManager *wm = MWBase::Environment::get().getWindowManager(); if(Settings::Manager::getBool("show owned", "Game"))
if(!mFocusObject.isEmpty())
{ {
MWWorld::CellRef& cellref = mFocusObject.getCellRef(); MWBase::WindowManager *wm = MWBase::Environment::get().getWindowManager();
MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPlayerPtr();
MWWorld::Ptr victim;
MWMechanics::MechanicsManager* mm = new MWMechanics::MechanicsManager; if(!mFocusObject.isEmpty())
bool allowed = mm->isAllowedToUse(ptr, cellref, victim); // 0 - owned, 1 - not owned {
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); wm->setCrosshairOwned(!allowed);
} }
else else
{ {
wm->setCrosshairOwned(false); wm->setCrosshairOwned(false);
}
} }
} }

@ -162,6 +162,9 @@ best attack = false
difficulty = 0 difficulty = 0
# change crosshair color when pointing on owned object
show owned = false
[Saves] [Saves]
character = character =
# Save when resting # Save when resting

Loading…
Cancel
Save