mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
use correct mechanics manager
This commit is contained in:
parent
15107ca5cf
commit
c019f8e23d
@ -6,6 +6,8 @@
|
||||
#include <list>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
namespace osg
|
||||
{
|
||||
class Vec3f;
|
||||
@ -211,6 +213,8 @@ namespace MWBase
|
||||
|
||||
/// Has the player stolen this item from the given owner?
|
||||
virtual bool isItemStolenFrom(const std::string& itemid, const std::string& ownerid) = 0;
|
||||
|
||||
virtual bool isAllowedToUse (const MWWorld::Ptr& ptr, const MWWorld::CellRef& cellref, MWWorld::Ptr& victim) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/esmstore.hpp"
|
||||
#include "../mwmechanics/spellcasting.hpp"
|
||||
#include "../mwmechanics/mechanicsmanagerimp.hpp"
|
||||
|
||||
#include "mapwindow.hpp"
|
||||
#include "inventorywindow.hpp"
|
||||
@ -364,7 +363,7 @@ namespace MWGui
|
||||
MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
MWWorld::Ptr victim;
|
||||
|
||||
MWMechanics::MechanicsManager* mm = new MWMechanics::MechanicsManager;
|
||||
MWBase::MechanicsManager* mm = MWBase::Environment::get().getMechanicsManager();
|
||||
bool allowed = mm->isAllowedToUse(ptr, cellref, victim); // 0 - owned, 1 - not owned
|
||||
|
||||
wm->setCrosshairOwned(!allowed);
|
||||
|
Loading…
x
Reference in New Issue
Block a user