diff --git a/TwoForksVr/src/VrCamera/Patches/GameCameraPatches.cs b/TwoForksVr/src/VrCamera/Patches/GameCameraPatches.cs index eac638b5..b71523c9 100644 --- a/TwoForksVr/src/VrCamera/Patches/GameCameraPatches.cs +++ b/TwoForksVr/src/VrCamera/Patches/GameCameraPatches.cs @@ -17,13 +17,23 @@ private static void RecenterCamera() isDone = true; } - [HarmonyPatch(typeof(vgCameraController), nameof(vgCameraController.Start))] [HarmonyPrefix] - private static void ResetIsDoneOnCameraStart() + [HarmonyPatch(typeof(vgCameraController), nameof(vgCameraController.Start))] + private static void ResetIsDoneOnCameraStart(vgCameraController __instance) { isDone = false; } + [HarmonyPostfix] + [HarmonyPatch(typeof(vgPlayerNavigationController), nameof(vgPlayerNavigationController.Start))] + private static void FixFog(vgPlayerNavigationController __instance) + { + var stylisticFog = __instance.cameraController.camera.GetComponent(); + if (!stylisticFog || !stylisticFog.enabled) return; + stylisticFog.enabled = false; + stylisticFog.enabled = true; + } + [HarmonyPrefix] [HarmonyPatch(typeof(vgLoadingCamera), nameof(vgLoadingCamera.OnEnable))] private static void ResetIsDoneOnLoading(vgLoadingCamera __instance)