mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
make fog fix better
This commit is contained in:
parent
fe8038d1c7
commit
19c5daaba6
@ -1,5 +1,4 @@
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace NewHorizons.Patches
|
namespace NewHorizons.Patches
|
||||||
{
|
{
|
||||||
@ -9,24 +8,22 @@ namespace NewHorizons.Patches
|
|||||||
// Morbius moment: they only let fog go away if there is a fog controller on the planet near you
|
// Morbius moment: they only let fog go away if there is a fog controller on the planet near you
|
||||||
// However you can leave these volumes with fog on your screen, or have fog applied by a bramble node on a fogless planet
|
// However you can leave these volumes with fog on your screen, or have fog applied by a bramble node on a fogless planet
|
||||||
|
|
||||||
[HarmonyPrefix]
|
[HarmonyPostfix]
|
||||||
[HarmonyPatch(typeof(PlayerFogWarpDetector), nameof(PlayerFogWarpDetector.LateUpdate))]
|
[HarmonyPatch(typeof(PlayerFogWarpDetector), nameof(PlayerFogWarpDetector.LateUpdate))]
|
||||||
public static bool PlayerFogWarpDetector_LateUpdate(PlayerFogWarpDetector __instance)
|
public static void PlayerFogWarpDetector_LateUpdate(PlayerFogWarpDetector __instance)
|
||||||
{
|
{
|
||||||
if (PlanetaryFogController.GetActiveFogSphere() == null)
|
if (PlanetaryFogController.GetActiveFogSphere() == null)
|
||||||
{
|
{
|
||||||
float num = __instance._targetFogFraction;
|
__instance._fogFraction = 0;
|
||||||
if (__instance._playerEffectBubbleController != null)
|
if (__instance._playerEffectBubbleController != null)
|
||||||
{
|
{
|
||||||
__instance._playerEffectBubbleController.SetFogFade(0, __instance._fogColor);
|
__instance._playerEffectBubbleController.SetFogFade(__instance._fogFraction, __instance._fogColor);
|
||||||
}
|
}
|
||||||
if (__instance._shipLandingCamEffectBubbleController != null)
|
if (__instance._shipLandingCamEffectBubbleController != null)
|
||||||
{
|
{
|
||||||
__instance._shipLandingCamEffectBubbleController.SetFogFade(0, __instance._fogColor);
|
__instance._shipLandingCamEffectBubbleController.SetFogFade(__instance._fogFraction, __instance._fogColor);
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user