NAK_CVR_Mods/SmoothRay/HarmonyPatches.cs
NotAKidoS 1045679be1 [SmoothRay] Slight change to patch
Compiler already would do this, but I figured I'd throw it here too just because I can.
2023-06-14 20:03:50 -05:00

15 lines
No EOL
490 B
C#

using ABI_RC.Core.Player;
using HarmonyLib;
namespace NAK.SmoothRay.HarmonyPatches;
class PlayerSetupPatches
{
[HarmonyPostfix]
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.Start))]
static void Post_PlayerSetup_Start(ref PlayerSetup __instance)
{
__instance.vrLeftHandTracker.gameObject.AddComponent<SmoothRayer>().ray = __instance.leftRay;
__instance.vrRightHandTracker.gameObject.AddComponent<SmoothRayer>().ray = __instance.rightRay;
}
}