Fixes ship/scout HUD markers being hidden #647

This commit is contained in:
Nick 2023-07-18 23:32:45 -04:00
parent b76845a172
commit a5e55f4081
2 changed files with 4 additions and 3 deletions

View File

@ -23,8 +23,7 @@ namespace NewHorizons.External.Configs
/// <summary>
/// When well past the furthest orbit, should the player be summoned back to the star?
/// </summary>
[DefaultValue(true)]
public bool returnToSolarSystemWhenTooFar = true;
public bool returnToSolarSystemWhenTooFar;
/// <summary>
/// An override value for the far clip plane. Allows you to see farther.

View File

@ -1,5 +1,6 @@
using NewHorizons.Components.EOTE;
using NewHorizons.OtherMods.VoiceActing;
using NewHorizons.Utility;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
@ -81,7 +82,8 @@ namespace NewHorizons.Handlers
if (!_cloaks.Any())
{
Locator.RegisterCloakFieldController(null);
// For some reason ship/scout HUD markers break if this isn't set to the Stranger when it is disabled #647
Locator.RegisterCloakFieldController(GameObject.FindObjectOfType<CloakFieldController>());
Shader.DisableKeyword("_CLOAKINGFIELDENABLED");
_cloakLocator.SetCurrentCloak(null);
_cloakLocator.enabled = false;