diff --git a/src/mods/vr/FFakeStereoRenderingHook.cpp b/src/mods/vr/FFakeStereoRenderingHook.cpp index 1eed6b2b..ec622421 100644 --- a/src/mods/vr/FFakeStereoRenderingHook.cpp +++ b/src/mods/vr/FFakeStereoRenderingHook.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -4112,11 +4113,11 @@ __forceinline void FFakeStereoRenderingHook::calculate_stereo_view_offset( if (pawn != nullptr && vr->is_aim_pawn_control_rotation_enabled()) { auto camera_component = (sdk::UObject*)pawn->get_camera_component(); - if (camera_component != nullptr) { - auto data = camera_component->get_property_data(L"bUsePawnControlRotation"); + if (camera_component != nullptr && camera_component->get_class() != nullptr) { + static const auto boolprop = (sdk::FBoolProperty*)camera_component->get_class()->find_property(L"bUsePawnControlRotation"); - if (data != nullptr) { - *(bool*)data = true; + if (boolprop != nullptr) { + boolprop->set_value_in_object(camera_component, true); } } }