mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
crosshair owned - settings option
This commit is contained in:
parent
66edae9b93
commit
15107ca5cf
2 changed files with 19 additions and 13 deletions
|
@ -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;
|
||||||
|
|
||||||
wm->setCrosshairOwned(!allowed);
|
MWMechanics::MechanicsManager* mm = new MWMechanics::MechanicsManager;
|
||||||
}
|
bool allowed = mm->isAllowedToUse(ptr, cellref, victim); // 0 - owned, 1 - not owned
|
||||||
else
|
|
||||||
{
|
wm->setCrosshairOwned(!allowed);
|
||||||
wm->setCrosshairOwned(false);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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…
Reference in a new issue