From 4c15cceb324cae6d9314b4a7f1ee83c2182ce99b Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 20 Feb 2025 15:41:13 +0300 Subject: [PATCH] engine: client: deprecate custom id, it is not used meaningfully by anyone --- engine/client/cl_mobile.c | 7 ++++++- engine/client/client.h | 1 - engine/client/identification.c | 18 +----------------- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/engine/client/cl_mobile.c b/engine/client/cl_mobile.c index 5c0da8f7..7e441830 100644 --- a/engine/client/cl_mobile.c +++ b/engine/client/cl_mobile.c @@ -92,6 +92,11 @@ static char *pfnParseFileSafe( char *data, char *buf, const int size, unsigned i return COM_ParseFileSafe( data, buf, size, flags, len, NULL ); } +static void GAME_EXPORT pfnSetCustomClientID( const char *id ) +{ + // deprecated +} + static const mobile_engfuncs_t gMobileEngfuncs = { MOBILITY_API_VERSION, @@ -106,7 +111,7 @@ static const mobile_engfuncs_t gMobileEngfuncs = pfnDrawScaledCharacter, Sys_Warn, Sys_GetNativeObject, - ID_SetCustomClientID, + pfnSetCustomClientID, pfnParseFileSafe }; diff --git a/engine/client/client.h b/engine/client/client.h index a5b49d4a..c4ded668 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -1215,7 +1215,6 @@ void OSK_Draw( void ); // void ID_Init( void ); const char *ID_GetMD5( void ); -void GAME_EXPORT ID_SetCustomClientID( const char *id ); extern rgba_t g_color_table[8]; extern triangleapi_t gTriApi; diff --git a/engine/client/identification.c b/engine/client/identification.c index 33964b6a..6f5adc52 100644 --- a/engine/client/identification.c +++ b/engine/client/identification.c @@ -19,8 +19,8 @@ GNU General Public License for more details. #if !XASH_WIN32 #include #endif + static char id_md5[33]; -static char id_customid[MAX_STRING]; /* ========================================================== @@ -590,25 +590,9 @@ static void ID_Check( void ) const char *ID_GetMD5( void ) { - if( id_customid[0] ) - return id_customid; return id_md5; } -/* -=============== -ID_SetCustomClientID - -=============== -*/ -void GAME_EXPORT ID_SetCustomClientID( const char *id ) -{ - if( !id ) - return; - - Q_strncpy( id_customid, id, sizeof( id_customid ) ); -} - void ID_Init( void ) { MD5Context_t hash = { 0 };