Add types.Actor.isDead

macos_ci_fix
Evil Eye 1 year ago
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…
Cancel
Save