Hook StudioRenderModel

This commit is contained in:
8dcc 2023-07-24 16:17:57 +02:00
parent c48c4164f2
commit 78f0527317
2 changed files with 9 additions and 0 deletions

View File

@ -9,10 +9,12 @@
DECL_HOOK(CL_CreateMove);
DECL_HOOK(HUD_Redraw);
DECL_HOOK(StudioRenderModel);
bool hooks_init(void) {
HOOK(i_client, CL_CreateMove);
HOOK(i_client, HUD_Redraw);
HOOK(i_studiomodelrenderer, StudioRenderModel);
return true;
}
@ -51,3 +53,9 @@ int h_HUD_Redraw(float time, int intermission) {
return ret;
}
void h_StudioRenderModel(void* this_ptr) {
ORIGINAL(StudioRenderModel, this_ptr);
printf("Hi from StudioRenderModel!\n");
}

View File

@ -62,5 +62,6 @@
bool hooks_init(void);
DECL_HOOK_EXTERN(void, CL_CreateMove, float, usercmd_t*, int);
DECL_HOOK_EXTERN(int, HUD_Redraw, float, int);
DECL_HOOK_EXTERN(void, StudioRenderModel, void* this_ptr);
#endif /* HOOKS_H_ */