From 550c0404a8b6fbee857003c961bb802121e88f51 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Thu, 27 Jul 2017 11:32:35 +0200 Subject: Add LuaEntity on_death callback (#6177) Add LuaEntity on_death callback This fixes #5474 --- src/content_sao.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/content_sao.cpp') 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); + } -- cgit v1.2.3