public static bool StopTimeOnJump(FVRMovementManager __instance) { if (CorePlugin._timeStopsOnJump.Value) { Time.timeScale = Time.timeScale == 0 ? 1 : 0; Time.fixedDeltaTime = Time.timeScale / SteamVR.instance.hmd_DisplayFrequency; } return(!CorePlugin._timeStopsOnJump.Value); //skip the rest of the function when the config is true }
public void TeleportPlayer(Transform to) { #if !UNITY_EDITOR FVRMovementManager mm = GM.CurrentMovementManager; // If the player is currently holding a ladder, break them off it if (mm.m_curGrabPoint) { mm.EndGrabPointMove(mm.m_curGrabPoint); } // Then teleport away mm.TeleportToPoint(to.position, true, to.eulerAngles); #endif }