From 796620ec11f320ddc9991e8e783bb4d0ea2c0e65 Mon Sep 17 00:00:00 2001 From: Eddoursul Date: Mon, 8 Jul 2024 01:48:24 +0200 Subject: [PATCH] Moved hook to InitHavok --- src/Hooks.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Hooks.h b/src/Hooks.h index f0402a7..436730e 100644 --- a/src/Hooks.h +++ b/src/Hooks.h @@ -4,9 +4,9 @@ struct SetBookShaderHook { - static RE::NiAVObject* thunk(RE::TESObjectREFR& a_this, bool a_loadInBackground) + static char thunk(RE::TESObjectREFR& a_this) { - const auto ret = func(a_this, a_loadInBackground); + const auto ret = func(a_this); TryAddBookRefShader(&a_this); @@ -18,7 +18,7 @@ struct SetBookShaderHook static void Install() { REL::Relocation vTable(RE::TESObjectREFR::VTABLE[0]); - func = vTable.write_vfunc(0x6A, thunk); // NiAVObject* Load3D(bool a_backgroundLoading) + func = vTable.write_vfunc(0x66, thunk); // NiAVObject* Load3D(bool a_backgroundLoading) logger::info("Added book shader hook"); } };