mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Add LuaEntity on_death callback (#6177)
Add LuaEntity on_death callback This fixes #5474
This commit is contained in:
parent
ba959ce27f
commit
550c0404a8
5 changed files with 44 additions and 7 deletions
|
@ -582,8 +582,10 @@ int LuaEntitySAO::punch(v3f dir,
|
|||
}
|
||||
}
|
||||
|
||||
if (getHP() == 0)
|
||||
if (getHP() == 0) {
|
||||
m_removed = true;
|
||||
m_env->getScriptIface()->luaentity_on_death(m_id, puncher);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue