Manual recursion fix

This commit is contained in:
TerrificTrifid 2023-01-01 20:05:32 -06:00
parent b722297ad5
commit dca5636480
2 changed files with 15 additions and 0 deletions

View File

@ -365,6 +365,15 @@ namespace NewHorizons.Builder.Props
var success = PairEntrance(innerFogWarpVolume, config.linksTo); var success = PairEntrance(innerFogWarpVolume, config.linksTo);
if (!success) RecordUnpairedNode(innerFogWarpVolume, config.linksTo); if (!success) RecordUnpairedNode(innerFogWarpVolume, config.linksTo);
if (config.preventRecursionCrash)
{
Delay.FireOnNextUpdate(() =>
{
var destination = GetOuterFogWarpVolumeFromAstroObject(AstroObjectLocator.GetAstroObject(config.linksTo).gameObject);
if (destination != null) destination._senderWarps.Remove(innerFogWarpVolume);
});
}
// Cleanup for dimension exits // Cleanup for dimension exits
if (config.name != null) if (config.name != null)
{ {

View File

@ -134,6 +134,12 @@ namespace NewHorizons.External.Modules
/// </summary> /// </summary>
public int[] possibleExits; public int[] possibleExits;
/// <summary>
/// If your game hard crashes upon entering bramble, it's most likely because you have indirectly recursive dimensions, i.e. one leads to another that leads back to the first one.
/// Set this to true for one of the nodes in the recursion to fix this, at the cost of it no longer showing markers for the scout, ship, etc.
/// </summary>
[DefaultValue(false)] public bool preventRecursionCrash = false;
#region Obsolete #region Obsolete
[Obsolete("farFogTint is deprecated, please use fogTint instead")] [Obsolete("farFogTint is deprecated, please use fogTint instead")]