aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorLars Müller <34514239+appgurueu@users.noreply.github.com>2022-06-11 20:00:40 +0200
committerGitHub <noreply@github.com>2022-06-11 20:00:40 +0200
commitf4a53f7ee6fb5482f8193353c35be54b40533d6f (patch)
treefbbf1f323a0f0340e9f07c851bfba7c23e30b670 /src/network
parent3eafcab64ecaf8d00a9264b441e996825a6a31bd (diff)
downloadminetest-f4a53f7ee6fb5482f8193353c35be54b40533d6f.tar.gz
minetest-f4a53f7ee6fb5482f8193353c35be54b40533d6f.tar.bz2
minetest-f4a53f7ee6fb5482f8193353c35be54b40533d6f.zip
No damage effects on hp_max change (#11846)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 78ace6a81..5fee908a3 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -570,6 +570,10 @@ void Client::handleCommand_HP(NetworkPacket *pkt)
u16 hp;
*pkt >> hp;
+ bool damage_effect = true;
+ try {
+ *pkt >> damage_effect;
+ } catch (PacketError &e) {};
player->hp = hp;
@@ -581,6 +585,7 @@ void Client::handleCommand_HP(NetworkPacket *pkt)
ClientEvent *event = new ClientEvent();
event->type = CE_PLAYER_DAMAGE;
event->player_damage.amount = oldhp - hp;
+ event->player_damage.effect = damage_effect;
m_client_event_queue.push(event);
}
}