Moved hook to InitHavok

This commit is contained in:
Eddoursul 2024-07-08 01:48:24 +02:00
parent 6b4b19bbfa
commit 796620ec11

View File

@ -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<uintptr_t> 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");
}
};