diff --git a/dlls/cstrike/cstrike/CstrikeDatas.h b/dlls/cstrike/cstrike/CstrikeDatas.h index b4af6ceb..9884b4d0 100644 --- a/dlls/cstrike/cstrike/CstrikeDatas.h +++ b/dlls/cstrike/cstrike/CstrikeDatas.h @@ -146,13 +146,17 @@ #endif #if defined __linux__ -#define CS_DETOURCOPYBYTES_CLIENTCOMMAND 6 + #define CS_DETOURCOPYBYTES_CLIENTCOMMAND 6 + #define CS_SYM_USEBOTARGS "UseBotArgs" + #define CS_SYM_BOTARGS "BotArgs" #elif defined __APPLE__ -#define CS_DETOURCOPYBYTES_CLIENTCOMMAND 5 + #define CS_DETOURCOPYBYTES_CLIENTCOMMAND 5 + #define CS_SYM_USEBOTARGS "_UseBotArgs" + #define CS_SYM_BOTARGS "_BotArgs" #else -#define CS_DETOURCOPYBYTES_CLIENTCOMMAND 6 -#define CS_CLICMD_OFFS_USEBOTARGS 2 -#define CS_CLICMD_OFFS_BOTARGS 22 + #define CS_DETOURCOPYBYTES_CLIENTCOMMAND 6 + #define CS_CLICMD_OFFS_USEBOTARGS 2 + #define CS_CLICMD_OFFS_BOTARGS 22 #endif /** diff --git a/dlls/cstrike/cstrike/CstrikeHacks.cpp b/dlls/cstrike/cstrike/CstrikeHacks.cpp index 4fa01792..e58c6dce 100644 --- a/dlls/cstrike/cstrike/CstrikeHacks.cpp +++ b/dlls/cstrike/cstrike/CstrikeHacks.cpp @@ -169,8 +169,8 @@ void CtrlDetours(bool set) void *buyItemAddress = g_MemUtils.ResolveSymbol(target, CS_SYM_BUYITEM); void *buyGunAmmoAddress = g_MemUtils.ResolveSymbol(target, CS_SYM_BUYGUNAMMO); - g_UseBotArgs = (int *)g_MemUtils.ResolveSymbol(target, "UseBotArgs"); - g_BotArgs = (const char **)g_MemUtils.ResolveSymbol(target, "BotArgs"); + g_UseBotArgs = (int *)g_MemUtils.ResolveSymbol(target, CS_SYM_USEBOTARGS); + g_BotArgs = (const char **)g_MemUtils.ResolveSymbol(target, CS_SYM_BOTARGS); #elif defined(__APPLE__) @@ -180,8 +180,8 @@ void CtrlDetours(bool set) symbols[0].n_un.n_name = (char *)CS_SYM_CANBUYTHIS; symbols[1].n_un.n_name = (char *)CS_SYM_BUYITEM; symbols[2].n_un.n_name = (char *)CS_SYM_BUYGUNAMMO; - symbols[3].n_un.n_name = (char *)"_UseBotArgs"; - symbols[4].n_un.n_name = (char *)"_BotArgs"; + symbols[3].n_un.n_name = (char *)CS_SYM_USEBOTARGS; + symbols[4].n_un.n_name = (char *)CS_SYM_BOTARGS; if (nlist(libName, symbols) != 0) { return; }