mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
WhereAmIPointing: fixed dimming of ray when no menu is open
This commit is contained in:
parent
da90e4623f
commit
832f392682
2 changed files with 4 additions and 3 deletions
|
@ -40,7 +40,7 @@ public class WhereAmIPointingMod : MelonMod
|
|||
|
||||
#region Patches
|
||||
|
||||
private static class ControllerRay_Patches
|
||||
private static class ControllerRay_Patches
|
||||
{
|
||||
private const float ORIGINAL_ALPHA = 0.502f;
|
||||
private const float INTERACTION_ALPHA = 0.1f;
|
||||
|
@ -70,7 +70,8 @@ public class WhereAmIPointingMod : MelonMod
|
|||
Material material = instance.lineRenderer.material;
|
||||
Color color = material.color;
|
||||
|
||||
float targetAlpha = instance.uiActive ? ORIGINAL_ALPHA : INTERACTION_ALPHA;
|
||||
bool anyMenuOpen = ViewManager.Instance.IsAnyMenuOpen;
|
||||
float targetAlpha = (!anyMenuOpen || instance.uiActive) ? ORIGINAL_ALPHA : INTERACTION_ALPHA;
|
||||
if (!(Math.Abs(color.a - targetAlpha) > float.Epsilon))
|
||||
return;
|
||||
|
||||
|
|
|
@ -27,6 +27,6 @@ using System.Reflection;
|
|||
namespace NAK.WhereAmIPointing.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "1.0.0";
|
||||
public const string Version = "1.0.1";
|
||||
public const string Author = "NotAKidoS";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue