diff --git a/NewHorizons/Builder/Props/BrambleNodeBuilder.cs b/NewHorizons/Builder/Props/BrambleNodeBuilder.cs index 4d2d32ce..6b8415cd 100644 --- a/NewHorizons/Builder/Props/BrambleNodeBuilder.cs +++ b/NewHorizons/Builder/Props/BrambleNodeBuilder.cs @@ -245,7 +245,7 @@ namespace NewHorizons.Builder.Props // Set the seed/node specific scales and other stuff if (config.isSeed) { - innerFogWarpVolume._exitRadius /= 1.8f; + //innerFogWarpVolume._exitRadius /= 1.8f; brambleNode.FindChild("PointLight_DB_FogLight").GetComponent().range *= config.scale; brambleNode.FindChild("Prefab_SeedPunctureVolume (2)").GetComponent().enabled = true; fogLight._maxVisibleDistance = float.PositiveInfinity; // Prefab does have working foglight aside from this diff --git a/NewHorizons/Patches/BramblePatches.cs b/NewHorizons/Patches/BramblePatches.cs index 0c6301f1..fcec7f30 100644 --- a/NewHorizons/Patches/BramblePatches.cs +++ b/NewHorizons/Patches/BramblePatches.cs @@ -4,23 +4,19 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using UnityEngine; namespace NewHorizons.Patches { [HarmonyPatch] public static class BramblePatches { - // - // this file is not great. the real solution to the issues these patches address should be solved by replacing bramble nodes' InnerFogWarpVolume - // components with a custom NHInnerFogWarpVolume component, and implement the below functions as overrides in the NHInnerFogWarpVolume class - // that would fix the issue of seeds having inappropriate screen fog - // [HarmonyPrefix] [HarmonyPatch(typeof(SphericalFogWarpVolume), nameof(SphericalFogWarpVolume.IsProbeOnly))] public static bool SphericalFogWarpVolume_IsProbeOnly(SphericalFogWarpVolume __instance, ref bool __result) { - __result = false; + __result = Mathf.Approximately(__instance._exitRadius / __instance._warpRadius, 2f); // Check the ratio between these to determine if seed, instead of just < 10 return false; }