aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/client.cpp1
-rw-r--r--src/client/clientevent.h1
-rw-r--r--src/client/game.cpp3
3 files changed, 5 insertions, 0 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp
index d81ee434e..37d4bd816 100644
--- a/src/client/client.cpp
+++ b/src/client/client.cpp
@@ -493,6 +493,7 @@ void Client::step(float dtime)
ClientEvent *event = new ClientEvent();
event->type = CE_PLAYER_DAMAGE;
event->player_damage.amount = damage;
+ event->player_damage.effect = true;
m_client_event_queue.push(event);
}
}
diff --git a/src/client/clientevent.h b/src/client/clientevent.h
index 17d3aedd6..243a94596 100644
--- a/src/client/clientevent.h
+++ b/src/client/clientevent.h
@@ -87,6 +87,7 @@ struct ClientEvent
struct
{
u16 amount;
+ bool effect;
} player_damage;
struct
{
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();