mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
[CSM] Add enable_client_modding param (default: false)
This commit is contained in:
parent
0727bb3ddd
commit
44ca9c9cb2
9 changed files with 41 additions and 14 deletions
|
@ -413,7 +413,7 @@ void Client::handleCommand_ChatMessage(NetworkPacket* pkt)
|
|||
}
|
||||
|
||||
// If chat message not consummed by client lua API
|
||||
if (!m_script->on_receiving_message(wide_to_utf8(message))) {
|
||||
if (!moddingEnabled() || !m_script->on_receiving_message(wide_to_utf8(message))) {
|
||||
pushToChatQueue(message);
|
||||
}
|
||||
}
|
||||
|
@ -526,7 +526,9 @@ void Client::handleCommand_HP(NetworkPacket* pkt)
|
|||
|
||||
player->hp = hp;
|
||||
|
||||
m_script->on_hp_modification(hp);
|
||||
if (moddingEnabled()) {
|
||||
m_script->on_hp_modification(hp);
|
||||
}
|
||||
|
||||
if (hp < oldhp) {
|
||||
// Add to ClientEvent queue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue