mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Merge branch 'lua_death_finished' into 'master'
Add a Lua function to check if actor's death is finished See merge request OpenMW/openmw!3901
This commit is contained in:
commit
595e42ae43
@ -80,7 +80,7 @@ message(STATUS "Configuring OpenMW...")
|
||||
set(OPENMW_VERSION_MAJOR 0)
|
||||
set(OPENMW_VERSION_MINOR 49)
|
||||
set(OPENMW_VERSION_RELEASE 0)
|
||||
set(OPENMW_LUA_API_REVISION 54)
|
||||
set(OPENMW_LUA_API_REVISION 55)
|
||||
set(OPENMW_POSTPROCESSING_API_REVISION 1)
|
||||
|
||||
set(OPENMW_VERSION_COMMITHASH "")
|
||||
|
@ -403,6 +403,11 @@ namespace MWLua
|
||||
return target.getClass().getCreatureStats(target).isDead();
|
||||
};
|
||||
|
||||
actor["isDeathFinished"] = [](const Object& o) {
|
||||
const auto& target = o.ptr();
|
||||
return target.getClass().getCreatureStats(target).isDeathAnimationFinished();
|
||||
};
|
||||
|
||||
actor["getEncumbrance"] = [](const Object& actor) -> float {
|
||||
const MWWorld::Ptr ptr = actor.ptr();
|
||||
return ptr.getClass().getEncumbrance(ptr);
|
||||
|
@ -16,11 +16,17 @@
|
||||
-- @return #number
|
||||
|
||||
---
|
||||
-- Check if the given actor is dead.
|
||||
-- Check if the given actor is dead (health reached 0, so death process started).
|
||||
-- @function [parent=#Actor] isDead
|
||||
-- @param openmw.core#GameObject actor
|
||||
-- @return #boolean
|
||||
|
||||
---
|
||||
-- Check if the given actor's death process is finished.
|
||||
-- @function [parent=#Actor] isDeathFinished
|
||||
-- @param openmw.core#GameObject actor
|
||||
-- @return #boolean
|
||||
|
||||
---
|
||||
-- Agent bounds to be used for pathfinding functions.
|
||||
-- @function [parent=#Actor] getPathfindingAgentBounds
|
||||
|
Loading…
Reference in New Issue
Block a user