aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-07-27 11:32:35 +0200
committerGitHub <noreply@github.com>2017-07-27 11:32:35 +0200
commit550c0404a8b6fbee857003c961bb802121e88f51 (patch)
tree1b408c5cbb94b8211636d621eab2622e65906137 /src/content_sao.cpp
parentba959ce27f20d0887fc94da4e40880749a493cde (diff)
downloadhax-minetest-server-550c0404a8b6fbee857003c961bb802121e88f51.tar.gz
hax-minetest-server-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.cpp4
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);
+ }