From c14240eec9012ccd75816abbdf56d10c3d857f44 Mon Sep 17 00:00:00 2001 From: pv
Date: Thu, 28 Sep 2023 20:33:21 +0300 Subject: [PATCH] Disable TweakDB changes tracking --- src/scripting/LuaVM_Hooks.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scripting/LuaVM_Hooks.cpp b/src/scripting/LuaVM_Hooks.cpp index fdaa176a..e6af8945 100644 --- a/src/scripting/LuaVM_Hooks.cpp +++ b/src/scripting/LuaVM_Hooks.cpp @@ -329,6 +329,9 @@ uint64_t LuaVM::HookTweakDBLoad(uintptr_t aThis, uintptr_t aParam) { const auto ret = s_vm->m_realTweakDBLoad(aThis, aParam); + // Disable changes tracking added to TweakDB in patch 2.0 and causing instability. + RED4ext::TweakDB::Get()->unk160 = 0; + s_vm->PostInitializeTweakDB(); return ret;