From 4cc3c28985ba20f8b5e07a253f27f13277f2a429 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 2 Dec 2022 01:33:49 +0100 Subject: [PATCH] Deref VFTable pointer only once to obtain CShaderGlue::SetupShader Due to the new cache changes, the pointer should only be dereferenced once. --- r5dev/materialsystem/cshaderglue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r5dev/materialsystem/cshaderglue.h b/r5dev/materialsystem/cshaderglue.h index d7f8de69..d9e0cd62 100644 --- a/r5dev/materialsystem/cshaderglue.h +++ b/r5dev/materialsystem/cshaderglue.h @@ -49,7 +49,7 @@ class VShaderGlue : public IDetour } virtual void GetFun(void) const { - CShaderGlue_SetupShader = CShaderGlue_VTable.WalkVTable(4).Deref(2).RCast(); + CShaderGlue_SetupShader = CShaderGlue_VTable.WalkVTable(4).Deref().RCast(); } virtual void GetVar(void) const { } virtual void GetCon(void) const