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:
parent
cb3a61f8db
commit
9978f5af82
8 changed files with 76 additions and 18 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue