From a87b30dc4021a7a7e3b58a2116cdc4d9e707f33f Mon Sep 17 00:00:00 2001 From: 8dcc <8dcc.git@gmail.com> Date: Mon, 24 Jul 2023 17:33:27 +0200 Subject: [PATCH] Add player check to valid_player --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index 633be53..a1aa41a 100644 --- a/src/util.c +++ b/src/util.c @@ -26,7 +26,7 @@ bool is_alive(cl_entity_t* ent) { } bool valid_player(cl_entity_t* ent) { - return ent && ent->index != localplayer->index && + return ent && ent->player && ent->index != localplayer->index && ent->curstate.messagenum >= localplayer->curstate.messagenum; }