Skip to content

Commit

Permalink
Drop the quaaludes and implement infinite jump properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
L-uu committed Jun 11, 2022
1 parent ec724aa commit d53eaa6
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions LuuMod/Components/QuickMenuComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,21 @@ private static IEnumerator InfiniteJump()
{
while (true)
{
if (InfiniteJumpEnabled && Input.GetAxis("Jump") != 0f)
if (InfiniteJumpEnabled)
{
if (!VRCPlayer.field_Internal_Static_VRCPlayer_0.field_Private_VRCPlayerApi_0.IsPlayerGrounded())
if (VRCInputManager.Method_Public_Static_VRCInput_String_0("Jump").prop_Boolean_2
&& RoomManager.field_Internal_Static_ApiWorld_0 != null
&& !VRCPlayer.field_Internal_Static_VRCPlayer_0.field_Private_VRCPlayerApi_0.IsPlayerGrounded())
{
GameObject Plane = GameObject.CreatePrimitive(PrimitiveType.Plane);
Plane.GetComponent<Renderer>().enabled = false;
Plane.transform.position = VRCPlayer.field_Internal_Static_VRCPlayer_0.transform.position;
Object.Destroy(Plane, 0.5f);
try
{
Vector3 PlayerVelocity = VRCPlayer.field_Internal_Static_VRCPlayer_0.field_Private_VRCPlayerApi_0.GetVelocity();
PlayerVelocity.y = 3f;
VRCPlayer.field_Internal_Static_VRCPlayer_0.field_Private_VRCPlayerApi_0.SetVelocity(PlayerVelocity);
}
catch
{
}
}
}
yield return new WaitForSeconds(0.1f);
Expand Down

0 comments on commit d53eaa6

Please sign in to comment.