summaryrefslogtreecommitdiff
path: root/src/client/game.cpp
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/client/game.cpp
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/client/game.cpp')
-rw-r--r--src/client/game.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 441054631..5db472ee0 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -2605,6 +2605,9 @@ void Game::handleClientEvent_PlayerDamage(ClientEvent *event, CameraOrientation
if (client->modsLoaded())
client->getScript()->on_damage_taken(event->player_damage.amount);
+ if (!event->player_damage.effect)
+ return;
+
// Damage flash and hurt tilt are not used at death
if (client->getHP() > 0) {
LocalPlayer *player = client->getEnv().getLocalPlayer();