mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02: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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user