[PhysicsGunMod] PhysGun test

This commit is contained in:
NotAKidoS 2024-01-22 21:53:03 -06:00
parent 7e1445912d
commit d155ea546e
10 changed files with 862 additions and 0 deletions

View file

@ -0,0 +1,20 @@
using ABI_RC.Systems.InputManagement;
using HarmonyLib;
using NAK.PhysicsGunMod.Components;
using UnityEngine;
namespace NAK.PhysicsGunMod.HarmonyPatches;
internal static class CVRInputManagerPatches
{
[HarmonyPostfix]
[HarmonyPatch(typeof(CVRInputManager), nameof(CVRInputManager.Update))]
private static void Postfix_CVRInputManager_Update(ref CVRInputManager __instance)
{
if (PhysicsGunInteractionBehavior.Instance == null)
return;
if (PhysicsGunInteractionBehavior.Instance.UserRotation)
__instance.lookVector = Vector2.zero;
}
}