aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-01-22 00:20:55 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-03-13 23:56:05 +0100
commit9978f5af828550d819890fed1fc56d65838a2c4c (patch)
tree34ba1ca2f7b2607fcd60166419a3ca9ab436e9bb /src/network
parentcb3a61f8db6b7020dd69f7786a1086f6fe014dfc (diff)
downloadminetest-9978f5af828550d819890fed1fc56d65838a2c4c.tar.gz
minetest-9978f5af828550d819890fed1fc56d65838a2c4c.tar.bz2
minetest-9978f5af828550d819890fed1fc56d65838a2c4c.zip
[CSM] Add on_death, on_hp_modification & oh_damage_taken callbacks (#5093)
* Add on_death callback * Add on_hp_modification & on_damage_taken callbacks * move preview code to preview.lua
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index d0642c86a..97fa93e95 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -526,6 +526,8 @@ void Client::handleCommand_HP(NetworkPacket* pkt)
player->hp = hp;
+ m_script->on_hp_modification(hp);
+
if (hp < oldhp) {
// Add to ClientEvent queue
ClientEvent event;