diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-07-27 11:32:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-27 11:32:35 +0200 |
commit | 550c0404a8b6fbee857003c961bb802121e88f51 (patch) | |
tree | 1b408c5cbb94b8211636d621eab2622e65906137 /src/content_sao.cpp | |
parent | ba959ce27f20d0887fc94da4e40880749a493cde (diff) | |
download | minetest-550c0404a8b6fbee857003c961bb802121e88f51.tar.gz minetest-550c0404a8b6fbee857003c961bb802121e88f51.tar.bz2 minetest-550c0404a8b6fbee857003c961bb802121e88f51.zip |
Add LuaEntity on_death callback (#6177)
Add LuaEntity on_death callback
This fixes #5474
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r-- | src/content_sao.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp index df5cae34f..5ba4f1ad1 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -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); + } |