mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
[PhysicsGunMod] PhysGun test
This commit is contained in:
parent
7e1445912d
commit
d155ea546e
10 changed files with 862 additions and 0 deletions
20
PhysicsGunMod/HarmonyPatches.cs
Normal file
20
PhysicsGunMod/HarmonyPatches.cs
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue