diff --git a/src/mods/VR.cpp b/src/mods/VR.cpp index da97577d..43802d57 100644 --- a/src/mods/VR.cpp +++ b/src/mods/VR.cpp @@ -2087,6 +2087,7 @@ void VR::on_draw_sidebar_entry(std::string_view name) { if (selected_page == PAGE_COMPATIBILITY) { ImGui::SetNextItemOpen(true, ImGuiCond_::ImGuiCond_Once); if (ImGui::TreeNode("Compatibility Options")) { + m_compatibility_skip_uobjectarray_init->draw("Skip UObjectArray Init"); m_compatibility_skip_pip->draw("Skip PostInitProperties"); m_sceneview_compatibility_mode->draw("SceneView Compatibility Mode"); m_extreme_compat_mode->draw("Extreme Compatibility Mode"); diff --git a/src/mods/VR.hpp b/src/mods/VR.hpp index 3e1b9e90..67b91ef3 100644 --- a/src/mods/VR.hpp +++ b/src/mods/VR.hpp @@ -485,6 +485,10 @@ class VR : public Mod { bool should_skip_post_init_properties() const { return m_compatibility_skip_pip->value(); } + + bool should_skip_uobjectarray_init() const { + return m_compatibility_skip_uobjectarray_init->value(); + } bool is_extreme_compatibility_mode_enabled() const { return m_extreme_compat_mode->value(); @@ -735,6 +739,7 @@ class VR : public Mod { const ModToggle::Ptr m_sceneview_compatibility_mode{ ModToggle::create(generate_name("Compatibility_SceneView"), false) }; const ModToggle::Ptr m_compatibility_skip_pip{ ModToggle::create(generate_name("Compatibility_SkipPostInitProperties"), false) }; + const ModToggle::Ptr m_compatibility_skip_uobjectarray_init{ ModToggle::create(generate_name("Compatibility_SkipUObjectArrayInit"), false) }; struct DecoupledPitchData { mutable std::shared_mutex mtx{}; @@ -793,6 +798,7 @@ class VR : public Mod { *m_splitscreen_compatibility_mode, *m_splitscreen_view_index, *m_compatibility_skip_pip, + *m_compatibility_skip_uobjectarray_init, *m_sceneview_compatibility_mode, }; diff --git a/src/mods/vr/FFakeStereoRenderingHook.cpp b/src/mods/vr/FFakeStereoRenderingHook.cpp index 8da17406..beffdca0 100644 --- a/src/mods/vr/FFakeStereoRenderingHook.cpp +++ b/src/mods/vr/FFakeStereoRenderingHook.cpp @@ -95,9 +95,11 @@ void FFakeStereoRenderingHook::on_frame() { attempt_hook_fsceneview_constructor(); // TODO: see if this can be threaded; it might not be able to because of TLS or something - sdk::FName::get_constructor(); - sdk::FName::get_to_string(); - sdk::FUObjectArray::get(); + if (!VR::get()->should_skip_uobjectarray_init()) { + sdk::FName::get_constructor(); + sdk::FName::get_to_string(); + sdk::FUObjectArray::get(); + } // Ideally we want to do all hooking // from game engine tick. if it fails