diff --git a/src/globals.c b/src/globals.c index c629b1b..da643d3 100644 --- a/src/globals.c +++ b/src/globals.c @@ -24,8 +24,8 @@ bool globals_init(void) { } /* Get symbol addresses using dlsym and the handler we just opened */ - gp_engine = (cl_enginefunc_t*)dlsym(hw, "cl_enginefuncs"); - gp_client = (cl_clientfunc_t*)dlsym(hw, "cl_funcs"); + i_engine = (cl_enginefunc_t*)dlsym(hw, "cl_enginefuncs"); + i_client = (cl_clientfunc_t*)dlsym(hw, "cl_funcs"); return true; } diff --git a/src/hooks.c b/src/hooks.c index f95e2cc..18b2c6f 100644 --- a/src/hooks.c +++ b/src/hooks.c @@ -6,13 +6,13 @@ DECL_HOOK(CL_CreateMove); bool hooks_init(void) { - HOOK(gp_client, CL_CreateMove); + HOOK(i_client, CL_CreateMove); return true; } void h_CL_CreateMove(float frametime, usercmd_t* cmd, int active) { - /* printf("Hello from CL_CreateMove!\n"); */ + /* bhop(cmd); */ ORIGINAL(CL_CreateMove, frametime, cmd, active); } diff --git a/src/include/globals.h b/src/include/globals.h index ad91602..cf8f485 100644 --- a/src/include/globals.h +++ b/src/include/globals.h @@ -10,17 +10,17 @@ * DECL_INTF_EXTERN: Extern version for the header. * * prefix | meaning - * -------+---------------- - * gp_* | global pointer - * go_* | global original + * -------+------------------------------- + * i_* | interface ptr (global scope) + * o_* | original interface (not a ptr) */ #define DECL_INTF(type, name) \ - type* gp_##name = NULL; \ - type go_##name; + type* i_##name = NULL; \ + type o_##name; #define DECL_INTF_EXTERN(type, name) \ - extern type* gp_##name; \ - extern type go_##name; + extern type* i_##name; \ + extern type o_##name; /*----------------------------------------------------------------------------*/ diff --git a/src/main.c b/src/main.c index 8f477db..739f2d1 100644 --- a/src/main.c +++ b/src/main.c @@ -29,7 +29,7 @@ __attribute__((constructor)) void load(void) { return; } - gp_engine->pfnClientCmd("echo \"hl-cheat loaded successfully!\""); + i_engine->pfnClientCmd("echo \"hl-cheat loaded successfully!\""); } void self_unload(void) {