From 3080b4dc2dbb39c536771c0a3c405296509e7097 Mon Sep 17 00:00:00 2001 From: 8dcc <8dcc.git@gmail.com> Date: Fri, 28 Jul 2023 16:31:21 +0200 Subject: [PATCH] Store player_extra_info as void* --- src/globals.c | 5 ++--- src/include/globals.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/globals.c b/src/globals.c index ff4e53a..f8ca6ce 100644 --- a/src/globals.c +++ b/src/globals.c @@ -22,7 +22,7 @@ DECL_INTF(StudioModelRenderer_t, studiomodelrenderer); game_t* game_info; /* Array of extra_player_info's for each player */ -extra_player_info_t* player_extra_info; +void* player_extra_info; /* Updated in CL_CreateMove hook */ cl_entity_t* localplayer = NULL; @@ -56,8 +56,7 @@ bool globals_init(void) { const char* SMR_STR = "g_StudioRenderer"; /* For clang-format */ i_studiomodelrenderer = *(StudioModelRenderer_t**)dlsym(*h_client, SMR_STR); - const char* PEI_STR = "g_PlayerExtraInfo"; /* For clang-format */ - player_extra_info = (extra_player_info_t*)dlsym(*h_client, PEI_STR); + player_extra_info = dlsym(*h_client, "g_PlayerExtraInfo"); game_info = *(game_t**)dlsym(hw, "game"); diff --git a/src/include/globals.h b/src/include/globals.h index 1c17d35..573a933 100644 --- a/src/include/globals.h +++ b/src/include/globals.h @@ -44,7 +44,7 @@ DECL_INTF_EXTERN(engine_studio_api_t, enginestudio); DECL_INTF_EXTERN(StudioModelRenderer_t, studiomodelrenderer); extern game_t* game_info; -extern extra_player_info_t* player_extra_info; +extern void* player_extra_info; extern cl_entity_t* localplayer; /*----------------------------------------------------------------------------*/