2023-07-20 11:44:04 -04:00
|
|
|
|
|
|
|
#include "include/hooks.h"
|
|
|
|
#include "include/sdk.h"
|
|
|
|
#include "include/globals.h"
|
|
|
|
|
2023-07-20 17:21:01 -04:00
|
|
|
#include "features/include/movement.h"
|
|
|
|
|
2023-07-20 11:44:04 -04:00
|
|
|
DECL_HOOK(CL_CreateMove);
|
|
|
|
|
|
|
|
bool hooks_init(void) {
|
2023-07-20 14:25:49 -04:00
|
|
|
HOOK(i_client, CL_CreateMove);
|
2023-07-20 11:44:04 -04:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void h_CL_CreateMove(float frametime, usercmd_t* cmd, int active) {
|
|
|
|
ORIGINAL(CL_CreateMove, frametime, cmd, active);
|
2023-07-20 17:21:01 -04:00
|
|
|
|
2023-07-20 17:30:44 -04:00
|
|
|
/* Declared in globals.c */
|
|
|
|
localplayer = i_engine->GetLocalPlayer();
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
printf("x: %f, y: %f, z: %f\n", localplayer->origin[0],
|
|
|
|
localplayer->origin[1], localplayer->origin[2]);
|
|
|
|
#endif
|
|
|
|
|
2023-07-20 17:21:01 -04:00
|
|
|
bhop(cmd);
|
2023-07-20 11:44:04 -04:00
|
|
|
}
|