1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

[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
This commit is contained in:
Loïc Blot 2017-01-22 00:20:55 +01:00
parent cb3a61f8db
commit 9978f5af82
8 changed files with 76 additions and 18 deletions

View file

@ -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;