Add chat message when a player dies
This commit is contained in:
parent
ff1b19e2ee
commit
8360df84fe
|
@ -9,6 +9,7 @@
|
||||||
#include "audio/external.h"
|
#include "audio/external.h"
|
||||||
#include "engine/surface_collision.h"
|
#include "engine/surface_collision.h"
|
||||||
#include "game/object_list_processor.h"
|
#include "game/object_list_processor.h"
|
||||||
|
#include "game/chat.h"
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
struct PacketPlayerData {
|
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
|
// action changed, reset timer
|
||||||
if (m->action != oldData.action) {
|
if (m->action != oldData.action) {
|
||||||
m->actionTimer = 0;
|
m->actionTimer = 0;
|
||||||
|
|
Loading…
Reference in New Issue