mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[ThirdPerson] Prevented head hiding from persisting into third person while Avatar Overrender Ui is enabled
This commit is contained in:
parent
29028a9b54
commit
fb27ebb8af
1 changed files with 6 additions and 0 deletions
|
@ -4,6 +4,7 @@ using MelonLoader;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using static NAK.ThirdPerson.CameraLogic;
|
using static NAK.ThirdPerson.CameraLogic;
|
||||||
using ABI_RC.Core;
|
using ABI_RC.Core;
|
||||||
|
using ABI_RC.Core.Player.TransformHider;
|
||||||
|
|
||||||
namespace NAK.ThirdPerson;
|
namespace NAK.ThirdPerson;
|
||||||
|
|
||||||
|
@ -27,6 +28,10 @@ internal static class Patches
|
||||||
typeof(CVRTools).GetMethod(nameof(CVRTools.ConfigureHudAffinity), BindingFlags.Public | BindingFlags.Static),
|
typeof(CVRTools).GetMethod(nameof(CVRTools.ConfigureHudAffinity), BindingFlags.Public | BindingFlags.Static),
|
||||||
postfix: typeof(Patches).GetMethod(nameof(OnConfigureHudAffinity), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
postfix: typeof(Patches).GetMethod(nameof(OnConfigureHudAffinity), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
||||||
);
|
);
|
||||||
|
harmony.Patch(
|
||||||
|
typeof(TransformHiderManager).GetMethod(nameof(CVRTools.ConfigureHudAffinity), BindingFlags.NonPublic | BindingFlags.Static),
|
||||||
|
prefix: typeof(Patches).GetMethod(nameof(OnCheckPlayerCamWithinRange), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Copy camera settings & postprocessing components
|
//Copy camera settings & postprocessing components
|
||||||
|
@ -34,4 +39,5 @@ internal static class Patches
|
||||||
//Adjust camera distance with height as modifier
|
//Adjust camera distance with height as modifier
|
||||||
private static void OnScaleAdjusted(float height) => AdjustScale(height);
|
private static void OnScaleAdjusted(float height) => AdjustScale(height);
|
||||||
private static void OnConfigureHudAffinity() => CheckVRMode();
|
private static void OnConfigureHudAffinity() => CheckVRMode();
|
||||||
|
private static bool OnCheckPlayerCamWithinRange() => !State; // don't hide head if in third person
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue