Add hooks source

With hooks_init for hooking everything and CL_CreateMove hook
This commit is contained in:
8dcc 2023-07-20 17:44:04 +02:00
parent ef8504cdc9
commit b7711d2503
1 changed files with 18 additions and 0 deletions

18
src/hooks.c Normal file
View File

@ -0,0 +1,18 @@
#include "include/hooks.h"
#include "include/sdk.h"
#include "include/globals.h"
DECL_HOOK(CL_CreateMove);
bool hooks_init(void) {
HOOK(gp_client, CL_CreateMove);
return true;
}
void h_CL_CreateMove(float frametime, usercmd_t* cmd, int active) {
/* printf("Hello from CL_CreateMove!\n"); */
ORIGINAL(CL_CreateMove, frametime, cmd, active);
}