mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Add types.Actor.isDead
This commit is contained in:
parent
3baefdf29e
commit
2d90176fe9
@ -395,6 +395,11 @@ namespace MWLua
|
||||
return dist <= actorsProcessingRange;
|
||||
};
|
||||
|
||||
actor["isDead"] = [](const Object& o) {
|
||||
const auto& target = o.ptr();
|
||||
return target.getClass().getCreatureStats(target).isDead();
|
||||
};
|
||||
|
||||
actor["getEncumbrance"] = [](const Object& actor) -> float {
|
||||
const MWWorld::Ptr ptr = actor.ptr();
|
||||
return ptr.getClass().getEncumbrance(ptr);
|
||||
|
@ -15,6 +15,12 @@
|
||||
-- @param openmw.core#GameObject actor
|
||||
-- @return #number
|
||||
|
||||
---
|
||||
-- Check if the given actor is dead.
|
||||
-- @function [parent=#Actor] isDead
|
||||
-- @param openmw.core#GameObject actor
|
||||
-- @return #boolean
|
||||
|
||||
---
|
||||
-- Agent bounds to be used for pathfinding functions.
|
||||
-- @function [parent=#Actor] getPathfindingAgentBounds
|
||||
|
Loading…
x
Reference in New Issue
Block a user