[SmoothRay] Slight change to patch

Compiler already would do this, but I figured I'd throw it here too just because I can.
This commit is contained in:
NotAKidoS 2023-06-14 20:03:50 -05:00
parent 1bcb3b0d69
commit 1045679be1

View file

@ -9,9 +9,7 @@ class PlayerSetupPatches
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.Start))]
static void Post_PlayerSetup_Start(ref PlayerSetup __instance)
{
var leftSmoother = __instance.vrLeftHandTracker.gameObject.AddComponent<SmoothRayer>();
leftSmoother.ray = __instance.leftRay;
var rightSmoother = __instance.vrRightHandTracker.gameObject.AddComponent<SmoothRayer>();
rightSmoother.ray = __instance.rightRay;
__instance.vrLeftHandTracker.gameObject.AddComponent<SmoothRayer>().ray = __instance.leftRay;
__instance.vrRightHandTracker.gameObject.AddComponent<SmoothRayer>().ray = __instance.rightRay;
}
}