diff --git a/SmartReticle/Main.cs b/SmartReticle/Main.cs index ae94900..4533b0c 100644 --- a/SmartReticle/Main.cs +++ b/SmartReticle/Main.cs @@ -65,15 +65,18 @@ public class SmartReticleMod : MelonMod if (!Entry_Enabled.Value) return; - if (!__instance.isDesktopRay) + GameObject pointer; + if (__instance.isDesktopRay) // in desktop mode + pointer = CohtmlHud.Instance.desktopPointer; + else if (__instance.isHeadRay) // in VR mode with no controllers + pointer = __instance.backupCrossHair; + else return; - - GameObject desktopPointer = CohtmlHud.Instance.desktopPointer; - if (!desktopPointer.activeSelf) + if (!pointer.activeSelf) { _lastDisplayedTime = 0; // reset time - return; // pointing at menu or cursor is active + return; // pointing at menu or cursor / controllers active } bool shouldDisplayPointer = (__instance._interact // pressing mouse1 or mouse2 @@ -93,7 +96,7 @@ public class SmartReticleMod : MelonMod } if (Time.time - _lastDisplayedTime > Entry_HideTimeout.Value) - desktopPointer.SetActive(false); + pointer.SetActive(false); } } diff --git a/SmartReticle/format.json b/SmartReticle/format.json index 958ffac..b01de27 100644 --- a/SmartReticle/format.json +++ b/SmartReticle/format.json @@ -1,12 +1,12 @@ { - "_id": -1, + "_id": 233, "name": "SmartReticle", - "modversion": "1.0.0", + "modversion": "1.0.1", "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", - "description": "Simple mod that makes the Desktop reticle only appear when needed.", + "description": "Simple mod that makes the Desktop/VR Head reticle only appear when hovering over an interactable, holding an interaction button, or when using a tool.", "searchtags": [ "reticle", "hud", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r39/SmartReticle.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r40/SmartReticle.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/SmartReticle/", - "changelog": "- Initial Release", + "changelog": "- Adjusted to also work for the VR head reticle.", "embedcolor": "#f61963" } \ No newline at end of file