From edd628b154061bb57feac8bdaeb91f4d45be28bb Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 9 Sep 2023 03:01:47 +0300 Subject: [PATCH] client: fix DECLARE/HOOK macros --- cl_dll/cl_util.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cl_dll/cl_util.h b/cl_dll/cl_util.h index 41e23f1..b7bb30d 100644 --- a/cl_dll/cl_util.h +++ b/cl_dll/cl_util.h @@ -28,18 +28,18 @@ #define DECLARE_MESSAGE(y, x) int __MsgFunc_##x(const char *pszName, int iSize, void *pbuf) \ { \ - return gHUD.##y.MsgFunc_##x(pszName, iSize, pbuf ); \ + return gHUD.y.MsgFunc_##x(pszName, iSize, pbuf ); \ } #define HOOK_COMMAND(x, y) gEngfuncs.pfnAddCommand( x, __CmdFunc_##y ); #define DECLARE_COMMAND(y, x) void __CmdFunc_##x( void ) \ { \ - gHUD.##y.UserCmd_##x( ); \ + gHUD.y.UserCmd_##x( ); \ } -inline float CVAR_GET_FLOAT( const char *x ) { return gEngfuncs.pfnGetCvarFloat( (char*)x ); } -inline char* CVAR_GET_STRING( const char *x ) { return gEngfuncs.pfnGetCvarString( (char*)x ); } +inline float CVAR_GET_FLOAT( const char *x ) { return gEngfuncs.pfnGetCvarFloat( x ); } +inline char* CVAR_GET_STRING( const char *x ) { return gEngfuncs.pfnGetCvarString( x ); } inline struct cvar_s *CVAR_CREATE( const char *cv, const char *val, const int flags ) { return gEngfuncs.pfnRegisterVariable( (char*)cv, (char*)val, flags ); } #define SPR_Load (*gEngfuncs.pfnSPR_Load)