From d04b6ed302f8086256cef096845de7e71654c84a Mon Sep 17 00:00:00 2001 From: MysterD Date: Thu, 8 Oct 2020 21:19:16 -0700 Subject: [PATCH] Add chat message when a player dies --- src/pc/network/packets/packet_player.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pc/network/packets/packet_player.c b/src/pc/network/packets/packet_player.c index f4129f16..8a117ea7 100644 --- a/src/pc/network/packets/packet_player.c +++ b/src/pc/network/packets/packet_player.c @@ -9,6 +9,7 @@ #include "audio/external.h" #include "engine/surface_collision.h" #include "game/object_list_processor.h" +#include "game/chat.h" #pragma pack(1) struct PacketPlayerData { @@ -291,6 +292,11 @@ void network_receive_player(struct Packet* p) { } } + // inform of player death + if (oldData.action != ACT_BUBBLED && data.action == ACT_BUBBLED) { + chat_add_message("player died", CMT_SYSTEM); + } + // action changed, reset timer if (m->action != oldData.action) { m->actionTimer = 0;