Hook CalcRefdef, store punchAngles
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
DECL_HOOK(CL_CreateMove);
|
||||
DECL_HOOK(HUD_Redraw);
|
||||
DECL_HOOK(StudioRenderModel);
|
||||
DECL_HOOK(CalcRefdef);
|
||||
|
||||
/* OpenGL hooks */
|
||||
DECL_HOOK(glColor4f);
|
||||
@@ -27,6 +28,7 @@ bool hooks_init(void) {
|
||||
HOOK(i_client, CL_CreateMove);
|
||||
HOOK(i_client, HUD_Redraw);
|
||||
HOOK(i_studiomodelrenderer, StudioRenderModel);
|
||||
HOOK(i_client, CalcRefdef);
|
||||
|
||||
/* OpenGL hooks */
|
||||
GL_HOOK(glColor4f);
|
||||
@@ -85,6 +87,13 @@ void h_StudioRenderModel(void* this_ptr) {
|
||||
ORIGINAL(StudioRenderModel, this_ptr);
|
||||
}
|
||||
|
||||
void h_CalcRefdef(ref_params_t* params) {
|
||||
/* Store punch angles for CreateMove */
|
||||
vec_copy(g_punchAngles, params->punchangle);
|
||||
|
||||
ORIGINAL(CalcRefdef, params);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
void h_glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
|
||||
|
||||
Reference in New Issue
Block a user