From 8cfead04f9f5d8769b82913b7b8662f99e0a246a Mon Sep 17 00:00:00 2001 From: 8dcc <8dcc.git@gmail.com> Date: Fri, 28 Jul 2023 17:42:54 +0200 Subject: [PATCH] Cast to extra_player_info_dod_t depending on game --- src/util.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index cc9b904..afcd2cf 100644 --- a/src/util.c +++ b/src/util.c @@ -50,8 +50,14 @@ bool is_friend(cl_entity_t* ent) { return info[ent->index].teamnumber == info[localplayer->index].teamnumber; } + case DOD: { + extra_player_info_dod_t* info = + (extra_player_info_dod_t*)player_extra_info; + + return info[ent->index].teamnumber == + info[localplayer->index].teamnumber; + } case HL: - case DOD: default: return false; }