RUMBLE does not support other mod managers. If you want to use a manager, you must use the RUMBLE Mod Manager, a manager specifically designed for this game.
Decompiled source of RockCamEssentials v1.4.0
Mods/Rock Cam Essentials.dll
Decompiled 16 hours agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppLiv.Lck; using Il2CppLiv.Lck.Recorder; using Il2CppRUMBLE.Managers; using Il2CppRUMBLE.Players.Subsystems; using Il2CppRUMBLE.Recording.LCK; using Il2CppRUMBLE.Recording.LCK.Extensions; using Il2CppRUMBLE.Utilities; using MelonLoader; using Rock_Cam_Essentials; using RumbleModdingAPI; using UnityEngine; using UnityEngine.Rendering.Universal; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: MelonInfo(typeof(Main), "RockCamEssentials", "1.4.0", "Deterraleon", null)] [assembly: MelonGame("Buckethead Entertainment", "RUMBLE")] [assembly: MelonColor(255, 200, 0, 200)] [assembly: MelonAuthorColor(255, 255, 119, 255)] [assembly: VerifyLoaderVersion(0, 6, 6, true)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("Rock Cam Essentials")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+7a719df8b8496621820f8f9ec0a42221bceee014")] [assembly: AssemblyProduct("Rock Cam Essentials")] [assembly: AssemblyTitle("Rock Cam Essentials")] [assembly: AssemblyVersion("1.0.0.0")] namespace Rock_Cam_Essentials; public static class BuildInfo { public const string ModName = "RockCamEssentials"; public const string ModVersion = "1.4.0"; public const string Author = "Deterraleon"; } public class Main : MelonMod { private string currentScene = "Loader"; private bool enabled = true; public override void OnSceneWasLoaded(int buildIndex, string sceneName) { currentScene = sceneName; } public override void OnLateInitializeMelon() { Calls.onMapInitialized += mapLoaded; } public void mapLoaded() { } } public class Rock_Cam { public struct POVNames { public string ThirdPerson; public string FirstPerson; public string Handheld; } public struct RecordingSettings { public uint width; public uint height; public uint audioBitrate; public uint Bitrate; public uint framerate; public uint microphoneGain; } public int FOV = 50; public int TPmaxFOV = 100; public int FPmaxFOV = 100; public int HHmaxFOV = 100; public int TPminFOV = 30; public int FPminFOV = 30; public int HHminFOV = 30; public int TPFOVStep = 10; public int FPFOVStep = 10; public int HHFOVStep = 10; public LckDoubleButton TPFOVSetter; public LckDoubleButton FPFOVSetter; public LckDoubleButton HHFOVSetter; public int Smoothing = 0; public bool isFlippedTP = false; public bool isFlippedHH = false; public string POV = "Handheld"; public bool isHorizontal = true; public int PhotoTimer = 0; public int PhotoTimerIncrement = 2; public int PhotoTimerMaxValue = 8; public bool isRecording = false; public int DetachedPreview = 0; public bool DetachedPreviewChanged = false; public int MaxDespawnDistance = 2; public float SpawnYOffset = -0.1f; public float TabletSpawnDelay = 0.3f; public float MaximumRenderDistance = 2f; public float ThirdPersonDistance = 1f; public float ThirdPersonAngle = 15f; public PlayerLIV Camera; public LCKTabletUtility Tablet; public LCKCameraController CameraController; public LCKSettingsButtonsController POVController; public float TPPositionalSmoothing = 0f; public float TPRotationalSmoothing = 0f; public float FPPositionalSmoothing = 0f; public float FPRotationalSmoothing = 0f; public float HHPositionalSmoothing = 0f; public float HHRotationalSmoothing = 0f; public Il2CppReferenceArray<Transform> DetachedMonitors; public Transform RockCamTransform; public LckCamera TPCamera; public LckCamera FPCamera; public LckCamera HHCamera; public UniversalAdditionalCameraData TPCameraSettings; public UniversalAdditionalCameraData FPCameraSettings; public UniversalAdditionalCameraData HHCameraSettings; public LckService LckService; public int isShown = 1; public bool POVChanged = false; public LCKTabletDetachedPreview DetachedPreviewManager; public POVNames POVs; public Rock_Cam() { POVs.ThirdPerson = "TP"; POVs.FirstPerson = "FP"; POVs.Handheld = "HH"; Fix(); } public bool Fix() { try { Camera = ((Component)Singleton<PlayerManager>.instance.localPlayer.Controller).GetComponentInChildren<PlayerLIV>(); MaxDespawnDistance = Camera.maxDespawnDistance; SpawnYOffset = Camera.spawnYOffset; TabletSpawnDelay = Camera.tabletSpawnDelay; Tablet = Camera.LckTablet; MaximumRenderDistance = Tablet.maximumRenderDistance; isRecording = Tablet.isRecording; CameraController = Tablet.LckCameraController; ThirdPersonDistance = CameraController._thirdPersonDistance; isHorizontal = CameraController.IsHorizontalMode; POVController = CameraController._settingsButtonsController; ThirdPersonAngle = CameraController._thirdPersonHeightAngle; TPPositionalSmoothing = CameraController._thirdPersonStabilizer.PositionalSmoothing; TPRotationalSmoothing = CameraController._thirdPersonStabilizer.RotationalSmoothing; FPPositionalSmoothing = CameraController._firstPersonStabilizer.PositionalSmoothing; FPRotationalSmoothing = CameraController._firstPersonStabilizer.RotationalSmoothing; HHPositionalSmoothing = CameraController._selfieStabilizer.PositionalSmoothing; HHRotationalSmoothing = CameraController._selfieStabilizer.RotationalSmoothing; DetachedMonitors = CameraController._monitorTransforms; TPFOVSetter = CameraController.ThirdPersonFOVDoubleButton; FPFOVSetter = CameraController.FirstPersonFOVDoubleButton; HHFOVSetter = CameraController.SelfieFOVDoubleButton; FOV = TPFOVSetter._currentValue; TPmaxFOV = TPFOVSetter._maxValue; TPminFOV = TPFOVSetter._minValue; TPFOVStep = TPFOVSetter._increment; FOV = FPFOVSetter._currentValue; FPmaxFOV = FPFOVSetter._maxValue; FPminFOV = FPFOVSetter._minValue; FPFOVStep = FPFOVSetter._increment; FOV = HHFOVSetter._currentValue; HHmaxFOV = HHFOVSetter._maxValue; HHminFOV = HHFOVSetter._minValue; HHFOVStep = HHFOVSetter._increment; PhotoTimer = Tablet.photoTimerCurrentValue; PhotoTimerIncrement = Tablet.photoTimerIncrementValue; PhotoTimerMaxValue = Tablet.photoTimerMaxValue; RockCamTransform = ((Component)Tablet).transform; if (Camera.TabletVisualsAreActive) { isShown = 1; } else { isShown = 0; } TPCamera = Tablet.thirdPersonCamera; FPCamera = Tablet.firstPersonCamera; HHCamera = Tablet.selfieCamera; POVUpdate(); POVChanged = false; TPCameraSettings = ((Component)Tablet.thirdPersonCamera).gameObject.GetComponent<UniversalAdditionalCameraData>(); FPCameraSettings = ((Component)Tablet.firstPersonCamera).gameObject.GetComponent<UniversalAdditionalCameraData>(); HHCameraSettings = ((Component)Tablet.selfieCamera).gameObject.GetComponent<UniversalAdditionalCameraData>(); LckService = Camera.lckService; DetachedPreviewManager = Tablet.lckDetachedPreview; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool TakePhoto() { try { Tablet.TakePhoto(); } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool HideTablet() { try { Camera.HideTablet(); } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool ShowTablet() { try { Camera.ShowTablet(); } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool StartRecording() { if (isRecording != Camera.LckTablet.isRecording) { MelonLogger.Msg("isRecording variable is desynched"); isRecording = Camera.LckTablet.isRecording; } if (!isRecording) { isRecording = true; try { Tablet.ToggleRecordingAndUpdateRecordStatus(); } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } MelonLogger.Msg("Already recording"); return true; } public bool EndRecording() { if (isRecording != Camera.LckTablet.isRecording) { MelonLogger.Msg("isRecording variable is desynched"); isRecording = Camera.LckTablet.isRecording; } if (isRecording) { isRecording = false; try { Tablet.ToggleRecordingAndUpdateRecordStatus(); } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } return true; } public bool SetVertiacalOrientation() { if (isHorizontal != CameraController.IsHorizontalMode) { MelonLogger.Msg("isHorizontal variable desynched"); isHorizontal = CameraController.IsHorizontalMode; } if (isHorizontal) { isHorizontal = false; try { CameraController.ToggleOrientation(); } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } else { MelonLogger.Msg("Already vertical"); } return true; } public bool SetHorizontalOrientation() { if (isHorizontal != CameraController.IsHorizontalMode) { MelonLogger.Msg("isHorizontal variable desynched"); isHorizontal = CameraController.IsHorizontalMode; } if (!isHorizontal) { isHorizontal = true; try { CameraController.ToggleOrientation(); } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } else { MelonLogger.Msg("Already horizontal"); } return true; } public bool SetHandheldPOV() { try { POVController.SwitchToSelfieMode(); POV = "HH"; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetFirstPersonPOV() { try { POVController.SwitchToFPMode(); POV = "FP"; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetThirdPersonPOV() { try { POVController.SwitchToTPMode(); POV = "TP"; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetThirdPersonAngle(float angle) { try { CameraController._thirdPersonHeightAngle = angle; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetThirdPersonDistance(float distance) { try { CameraController._thirdPersonDistance = distance; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetThirdPersonDistanceMultiplier(float distanceMultiplier) { try { CameraController._thirdPersonDistanceMultiplier = distanceMultiplier; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool FlipCameraThirdPerson(bool flip) { if (isFlippedTP != CameraController.IsThirdPersonFront) { MelonLogger.Msg("isFlippedTP variable desynched"); isFlippedHH = CameraController.IsThirdPersonFront; } if (flip == isFlippedTP) { MelonLogger.Msg("TP camera already flipped correct way"); return true; } try { isFlippedTP = flip; CameraController.IsThirdPersonFront = !CameraController.IsThirdPersonFront; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetThirdPersonPositionalSmooting(float smooth) { if (smooth >= 1f && smooth != 99f) { MelonLogger.Warning("Smoothing of 1 or greater will result in no movement at all, you can set smoothing to 99 to avoid this message"); } try { CameraController._thirdPersonStabilizer.PositionalSmoothing = smooth; TPPositionalSmoothing = smooth; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetThirdPersonRotationalSmooting(float smooth) { if (smooth >= 1f && smooth != 99f) { MelonLogger.Warning("Smoothing of 1 or greater will result in no movement at all, you can set smoothing to 99 to avoid this message"); } try { CameraController._thirdPersonStabilizer.RotationalSmoothing = smooth; TPRotationalSmoothing = smooth; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetFirstPersonPositionalSmooting(float smooth) { if (smooth >= 1f && smooth != 99f) { MelonLogger.Warning("Smoothing of 1 or greater will result in no movement at all, you can set smoothing to 99 to avoid this message"); } try { CameraController._firstPersonStabilizer.PositionalSmoothing = smooth; FPPositionalSmoothing = smooth; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetFirstPersonRotationalSmooting(float smooth) { if (smooth >= 1f && smooth != 99f) { MelonLogger.Warning("Smoothing of 1 or greater will result in no movement at all, you can set smoothing to 99 to avoid this message"); } try { CameraController._firstPersonStabilizer.RotationalSmoothing = smooth; FPRotationalSmoothing = smooth; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetHandheldPositionalSmooting(float smooth) { if (smooth >= 1f && smooth != 99f) { MelonLogger.Warning("Smoothing of 1 or greater will result in no movement at all, you can set smoothing to 99 to avoid this message"); } try { CameraController._selfieStabilizer.PositionalSmoothing = smooth; HHPositionalSmoothing = smooth; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetHandheldRotationalSmooting(float smooth) { if (smooth >= 1f && smooth != 99f) { MelonLogger.Warning("Smoothing of 1 or greater will result in no movement at all, you can set smoothing to 99 to avoid this message"); } try { CameraController._selfieStabilizer.RotationalSmoothing = smooth; HHRotationalSmoothing = smooth; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetGlobalRotationalSmoothing(float smooth) { return SetThirdPersonRotationalSmooting(smooth) && SetFirstPersonRotationalSmooting(smooth) && SetHandheldRotationalSmooting(smooth); } public bool SetGlobalPositionalSmoothing(float smooth) { return SetThirdPersonPositionalSmooting(smooth) && SetFirstPersonPositionalSmooting(smooth) && SetHandheldPositionalSmooting(smooth); } public bool ResetCameraPosition() { try { if (POV == "TP") { CameraController._thirdPersonStabilizer.ReachTargetInstantly(); } if (POV == "FP") { CameraController._firstPersonStabilizer.ReachTargetInstantly(); } if (POV == "HH") { CameraController._selfieStabilizer.ReachTargetInstantly(); } } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetMaximumRenderDistance(float distance) { try { Tablet.maximumRenderDistance = distance; MaximumRenderDistance = distance; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool SetDetachedPreview(int index) { try { Tablet.lckDetachedPreview.SwitchPreview(index); UpdateDetachedPreview(); } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } return true; } public bool FlipCameraHandheld(bool flip) { if (isFlippedHH == flip) { MelonLogger.Msg("HH camera already flipped the right way"); return true; } try { CameraController.ProcessSelfieFlip(); isFlippedHH = flip; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetThirdPersonFOV(int fov) { if (TPFOVSetter._currentValue != FOV) { MelonLogger.Msg("FOV value desynched"); FOV = TPFOVSetter._currentValue; } try { TPFOVSetter._maxValue = 999999; TPFOVSetter._increment = fov - FOV; TPFOVSetter.OnPressDownIncrease(); TPFOVSetter.OnPressUpIncrease(); TPFOVSetter._maxValue = TPmaxFOV; TPFOVSetter._increment = TPFOVStep; FOV = fov; if (FOV != TPFOVSetter._currentValue) { MelonLogger.Msg(FOV + " " + TPFOVSetter._currentValue); } return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetFirstPersonFOV(int fov) { if (FPFOVSetter._currentValue != FOV) { MelonLogger.Msg("FOV value desynched"); FOV = FPFOVSetter._currentValue; } try { FPFOVSetter._maxValue = 999999; FPFOVSetter._increment = fov - FOV; FPFOVSetter.OnPressDownIncrease(); FPFOVSetter.OnPressUpIncrease(); FPFOVSetter._maxValue = FPmaxFOV; FPFOVSetter._increment = FPFOVStep; FOV = fov; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetHandheldFOV(int fov) { if (HHFOVSetter._currentValue != FOV) { MelonLogger.Msg("FOV value desynched"); FOV = HHFOVSetter._currentValue; } try { HHFOVSetter._maxValue = 999999; HHFOVSetter._increment = fov - FOV; HHFOVSetter.OnPressDownIncrease(); HHFOVSetter.OnPressUpIncrease(); HHFOVSetter._maxValue = HHmaxFOV; HHFOVSetter._increment = HHFOVStep; FOV = fov; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetThirdPersonFOVSettingsSettings(int maxFOV, int minFOV, int step) { try { TPFOVSetter._maxValue = maxFOV; TPFOVSetter._increment = step; TPFOVSetter._minValue = minFOV; TPmaxFOV = maxFOV; TPminFOV = minFOV; TPFOVStep = step; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetFirstPersonFOVSettingsSettings(int maxFOV, int minFOV, int step) { try { FPFOVSetter._maxValue = maxFOV; FPFOVSetter._increment = step; FPFOVSetter._minValue = minFOV; FPmaxFOV = maxFOV; FPminFOV = minFOV; FPFOVStep = step; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetHandheldFOVSettingsSettings(int maxFOV, int minFOV, int step) { try { HHFOVSetter._maxValue = maxFOV; HHFOVSetter._increment = step; HHFOVSetter._minValue = minFOV; HHmaxFOV = maxFOV; HHminFOV = minFOV; HHFOVStep = step; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetPhotoTimerValue(int time) { try { Tablet.photoTimerMaxValue = 999999; Tablet.photoTimerIncrementValue = time - PhotoTimer; Tablet.SwapPhotoTimerDelay(); Tablet.photoTimerMaxValue = PhotoTimerMaxValue; Tablet.photoTimerIncrementValue = PhotoTimerIncrement; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetPhotoTimerIncrement(int increment) { try { Tablet.photoTimerIncrementValue = increment; PhotoTimerIncrement = increment; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetPhotoTimerMaxValue(int maxValue) { try { Tablet.photoTimerMaxValue = maxValue; PhotoTimerMaxValue = maxValue; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetRockCamPosition(Vector3 position, Quaternion rotation) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) try { ((Component)Tablet).transform.position = position; ((Component)Tablet).transform.rotation = rotation; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetRelativeHandheldCameraPosition(Vector3 position, Vector3 rotation) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) try { CameraController.SetSelfieCameraOrientation(position, rotation); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetGlobalHandheldCameraPosition(Vector3 position, Quaternion rotation) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) try { Vector3 val = RockCamTransform.InverseTransformPoint(position); Quaternion val2 = Quaternion.Inverse(RockCamTransform.rotation) * rotation; CameraController.SetSelfieCameraOrientation(val, ((Quaternion)(ref val2)).eulerAngles); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetSpawnYOffset(float offset) { try { Camera.spawnYOffset = offset; SpawnYOffset = offset; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetRockCamSpawnDelay(float delay) { try { Camera.tabletSpawnDelay = delay; TabletSpawnDelay = delay; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SnapCameraStabilizerToTarget() { try { CameraController._thirdPersonStabilizer.ReachTargetInstantly(); CameraController._firstPersonStabilizer.ReachTargetInstantly(); CameraController._selfieStabilizer.ReachTargetInstantly(); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool FullCameraSetup(string pov = "Null", float positional_smoothing = -1f, float rotational_smoothing = -1f, int fov = -1, float TPCameraDistance = -1f, float TPCameraAngle = -1f) { try { if (pov == "Null") { pov = POV; } if (fov == -1) { fov = FOV; } switch (pov) { case "TP": SetThirdPersonPOV(); SetThirdPersonFOV(fov); if (TPCameraDistance == -1f) { TPCameraDistance = ThirdPersonDistance; } SetThirdPersonDistance(TPCameraDistance); if (TPCameraAngle != -1f) { SetThirdPersonAngle(TPCameraAngle); } if (positional_smoothing != -1f) { SetThirdPersonPositionalSmooting(positional_smoothing); } if (rotational_smoothing != -1f) { SetThirdPersonRotationalSmooting(rotational_smoothing); } break; case "FP": SetFirstPersonPOV(); SetFirstPersonFOV(fov); if (positional_smoothing != -1f) { SetFirstPersonPositionalSmooting(positional_smoothing); } if (rotational_smoothing != -1f) { SetFirstPersonRotationalSmooting(rotational_smoothing); } break; case "HH": SetHandheldPOV(); SetHandheldFOV(fov); if (positional_smoothing != -1f) { SetHandheldPositionalSmooting(positional_smoothing); } if (rotational_smoothing != -1f) { SetHandheldRotationalSmooting(rotational_smoothing); } break; default: MelonLogger.Error("Failed to find correct pov"); return false; } return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public int IsShownUpdate() { try { int num = 0; if (isShown % 2 == 1 != Camera.TabletVisualsAreActive) { num += 2; } if (Camera.TabletVisualsAreActive) { num++; } isShown = num; return num; } catch (Exception ex) { MelonLogger.Error((object)ex); return -1; } } public bool IsRecording() { try { isRecording = Tablet.isRecording; return isRecording; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool POVUpdate() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Invalid comparison between Unknown and I4 //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Invalid comparison between Unknown and I4 try { bool pOVChanged = false; if ((int)CameraController.CurrentCameraMode == 2) { if (POV != "TP") { pOVChanged = true; } POV = "TP"; } else if ((int)CameraController.CurrentCameraMode == 1) { if (POV != "FP") { pOVChanged = true; } POV = "FP"; } else { if ((int)CameraController.CurrentCameraMode != 0) { MelonLogger.Error("Error determining the POV"); return false; } if (POV != "HH") { pOVChanged = true; } POV = "HH"; } POVChanged = pOVChanged; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool FOVUpdate() { try { FOV = (int)CameraController.GetCurrentModeFOV(); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public Vector3 GetSpawnPosition() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) try { Transform child = ((Component)Singleton<PlayerManager>.Instance.localPlayer.Controller).transform.GetChild(2).GetChild(0).GetChild(0); Vector3 position = child.position; Vector3 val = new Vector3(child.forward.x, 0f, child.forward.z); return position + ((Vector3)(ref val)).normalized + new Vector3(0f, SpawnYOffset, 0f); } catch (Exception ex) { MelonLogger.Error((object)ex); return Vector3.zero; } } public Quaternion GetSpawnRotation() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) try { Transform child = ((Component)Singleton<PlayerManager>.Instance.localPlayer.Controller).transform.GetChild(2).GetChild(0).GetChild(0); Vector3 val = new Vector3(child.forward.x, 0f, child.forward.z); return Quaternion.LookRotation(-((Vector3)(ref val)).normalized - new Vector3(0f, SpawnYOffset, 0f)); } catch (Exception ex) { MelonLogger.Error((object)ex); return Quaternion.identity; } } public bool DoPostProcessing(string pov, bool value) { try { switch (pov) { case "TP": TPCameraSettings.renderPostProcessing = value; break; case "FP": FPCameraSettings.renderPostProcessing = value; break; case "HH": HHCameraSettings.renderPostProcessing = value; break; default: MelonLogger.Error("pov variable must either be TP, FP or HH, you can use the POVs variable for readability if needed."); return false; } return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetResolution(uint width, uint height) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) try { CameraResolutionDescriptor trackResolution = default(CameraResolutionDescriptor); ((CameraResolutionDescriptor)(ref trackResolution))..ctor(width, height); LckService.SetTrackResolution(trackResolution); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetVideoBitrate(uint bitrate) { try { LckService.SetTrackBitrate(bitrate); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetAudioBitrate(uint bitrate) { try { LckService.SetTrackAudioBitrate(bitrate); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetFramerate(uint framerate) { try { LckService.SetTrackFramerate(framerate); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetMicrophoneGainUntested(float gain) { try { LckService.SetMicrophoneGain(gain); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool FullRecordingSetup(uint width = 1920u, uint height = 1080u, uint framerate = 60u, uint videoBitrate = 10485760u, uint audioBitrate = 1048576u) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) try { CameraResolutionDescriptor val = default(CameraResolutionDescriptor); ((CameraResolutionDescriptor)(ref val))..ctor(width, height); CameraTrackDescriptor trackDescriptor = default(CameraTrackDescriptor); ((CameraTrackDescriptor)(ref trackDescriptor))..ctor(val, framerate, videoBitrate, audioBitrate); LckService.SetTrackDescriptor(trackDescriptor); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool RecordMicUntested(bool record) { try { LckService.SetMicrophoneCaptureActive(record); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool SetPOVBypassUntested(string pov = "Null", int detachedpreview = -1) { try { string text = ""; text = ((detachedpreview != -1) ? ((Il2CppArrayBase<Preview>)(object)DetachedPreviewManager.availablePreviews)[detachedpreview].AttachingMonitor.MonitorId : null); if (pov == "Null") { pov = POV; } switch (pov) { case "TP": LckService.SetActiveCamera(TPCamera.CameraId, text); break; case "FP": LckService.SetActiveCamera(FPCamera.CameraId, text); break; case "HH": LckService.SetActiveCamera(HHCamera.CameraId, text); break; default: MelonLogger.Error("pov variable must either be TP, FP or HH, you can use the POVs variable for readability if needed."); return false; } UpdateDetachedPreview(); return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public bool UpdateDetachedPreview() { try { if (DetachedPreview != DetachedPreviewManager.ActivePreviewNo) { DetachedPreviewChanged = true; } else { DetachedPreviewChanged = false; } DetachedPreview = DetachedPreviewManager.ActivePreviewNo; return true; } catch (Exception ex) { MelonLogger.Error((object)ex); return false; } } public RecordingSettings GetRecordingSetup() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) try { RecordingSettings result = default(RecordingSettings); CameraTrackDescriptor cameraTrackDescriptor = LckService.GetDescriptor().Result.cameraTrackDescriptor; result.framerate = cameraTrackDescriptor.Framerate; result.Bitrate = cameraTrackDescriptor.Bitrate; result.audioBitrate = cameraTrackDescriptor.AudioBitrate; result.width = cameraTrackDescriptor.CameraResolutionDescriptor.Width; result.height = cameraTrackDescriptor.CameraResolutionDescriptor.Height; return result; } catch (Exception ex) { MelonLogger.Error((object)ex); return default(RecordingSettings); } } public Vector2 GetVerticalResolution() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) try { return new Vector2((float)CameraController._verticalModeResolution.Width, (float)CameraController._verticalModeResolution.Height); } catch (Exception ex) { MelonLogger.Error((object)ex); return Vector2.zero; } } public Vector2 GetHorizontalResolutionUntested() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) try { return new Vector2((float)CameraController._pcTrackDescriptor.CameraResolutionDescriptor.Width, (float)CameraController._pcTrackDescriptor.CameraResolutionDescriptor.Height); } catch (Exception ex) { MelonLogger.Error((object)ex); return Vector2.zero; } } }