mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 04:20:29 +00:00
modified action interface to allow other actors besides the player
This commit is contained in:
parent
c38b02bd5c
commit
7e5ddae3b3
@ -29,7 +29,7 @@ namespace MWWorld
|
|||||||
throw std::runtime_error ("class does not have item health");
|
throw std::runtime_error ("class does not have item health");
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<Action> Class::activate (const Ptr& ptr) const
|
boost::shared_ptr<Action> Class::activate (const Ptr& ptr, const Ptr& actor) const
|
||||||
{
|
{
|
||||||
return boost::shared_ptr<Action> (new NullAction);
|
return boost::shared_ptr<Action> (new NullAction);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ namespace MWWorld
|
|||||||
///< Return item max health or throw an exception, if class does not have item health
|
///< Return item max health or throw an exception, if class does not have item health
|
||||||
/// (default implementation: throw an exceoption)
|
/// (default implementation: throw an exceoption)
|
||||||
|
|
||||||
virtual boost::shared_ptr<Action> activate (const Ptr& ptr) const;
|
virtual boost::shared_ptr<Action> activate (const Ptr& ptr, const Ptr& actor) const;
|
||||||
///< Generate action for activation (default implementation: return a null action).
|
///< Generate action for activation (default implementation: return a null action).
|
||||||
|
|
||||||
virtual boost::shared_ptr<Action> use (const Ptr& ptr) const;
|
virtual boost::shared_ptr<Action> use (const Ptr& ptr) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user