crosshair owned - settings option

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

@ -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);
}
}
}

@ -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

Loading…
Cancel
Save