using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using Brimstone.BallDistanceJobs; using Md.PlayerGolfer; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoDetour; using MonoDetour.Cil; using MonoDetour.DetourTypes; using MonoDetour.HookGen; using MonoMod.Cil; using Unity.Collections; using Unity.Jobs; using Unity.Mathematics; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("GameAssembly")] [assembly: IgnoresAccessChecksTo("SharedAssembly")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("com.github.LyricLy.BetterDistanceEstimation")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.2.8.0")] [assembly: AssemblyInformationalVersion("0.2.8+4bbb4a04ff1f73a312a0495fa12bd40e7c966882")] [assembly: AssemblyProduct("com.github.LyricLy.BetterDistanceEstimation")] [assembly: AssemblyTitle("BetterDistanceEstimation")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.2.8.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public struct LyricLyFirstGroundHitDistancesJob : IJobParallelFor { public NativeArray normalizedInitialSpeeds; public NativeHashMap spatiallyHashedTerrains; public NativeHashMap globalTerrainLayerIndicesPerLevelTerrainLayer; public NativeArray allTerrainLayerWeights; public NativeArray allTerrainHeights; public NativeArray allTerrainOverrides; public NativeList secondaryOutOfBoundsHazards; public NativeList levelHazards; public NativeArray estimatedDistances; public float mainOutOfBoundsHazardHeight; public OutOfBoundsHazard mainOutOfBoundsHazardType; public float2 terrainSize; public float2 initialWorldPosition2d; public float yawRad; public float fullInitialSpeed; public float baseInitialSpeed; public float verticalGravity; public float pitchRad; public float airDragCoefficient; public float deltaTime; public float3 flagPosition; public LyricLyFirstGroundHitDistancesJob(CalculateFirstGroundHitDistancesJob origJob, float3 flagPosition) { //IL_0002: 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_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_0014: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_0045: 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_0050: 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_0056: 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) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) mainOutOfBoundsHazardType = (OutOfBoundsHazard)0; normalizedInitialSpeeds = origJob.normalizedInitialSpeeds; spatiallyHashedTerrains = origJob.spatiallyHashedTerrains; globalTerrainLayerIndicesPerLevelTerrainLayer = origJob.globalTerrainLayerIndicesPerLevelTerrainLayer; allTerrainLayerWeights = origJob.allTerrainLayerWeights; allTerrainHeights = origJob.allTerrainHeights; allTerrainOverrides = origJob.allTerrainOverrides; secondaryOutOfBoundsHazards = origJob.secondaryOutOfBoundsHazards; levelHazards = origJob.levelHazards; estimatedDistances = origJob.estimatedDistances; mainOutOfBoundsHazardHeight = origJob.mainOutOfBoundsHazardHeight; terrainSize = origJob.terrainSize; initialWorldPosition2d = origJob.initialWorldPosition2d; yawRad = origJob.yawRad; fullInitialSpeed = origJob.fullInitialSpeed; baseInitialSpeed = origJob.baseInitialSpeed; verticalGravity = origJob.verticalGravity; pitchRad = origJob.pitchRad; airDragCoefficient = origJob.airDragCoefficient; deltaTime = origJob.deltaTime; this.flagPosition = flagPosition; } public void Execute(int initialSpeedIndex) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Invalid comparison between Unknown and I4 //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) float num = default(float); float num2 = default(float); math.sincos(yawRad, ref num, ref num2); float2 val = default(float2); ((float2)(ref val))..ctor(num, num2); float num3 = baseInitialSpeed + normalizedInitialSpeeds[initialSpeedIndex] * (fullInitialSpeed - baseInitialSpeed); float num4 = default(float); float num5 = default(float); math.sincos(pitchRad, ref num4, ref num5); float2 val2 = new float2(num5, num4) * num3; LyricLyFirstGroundHitDistancesJob us = this; float2 val3 = default(float2); ((float2)(ref val3))..ctor(0f, verticalGravity); Vector2 val4 = Vector2.zero; float2 simPos = float2.zero; float2 val5 = ((float3)(ref flagPosition)).xz / 2f; float2 val6 = default(float2); ((float2)(ref val6))..ctor(0f - flagPosition.z, flagPosition.x); float num6 = val6.y * val.x - val6.x * val.y; float ledgeX = (val6.y * val5.x - val6.x * val5.y) / num6; while (simPos.y >= Floor()) { val2 += val3 * us.deltaTime; val2 *= math.max(0f, 1f - us.airDragCoefficient * math.lengthsq(val2) * us.deltaTime); val4 = float2.op_Implicit(simPos); simPos += val2 * us.deltaTime; } float num7 = ((val4.x <= ledgeX && simPos.x > ledgeX) ? ledgeX : math.lerp(val4.x, simPos.x, BMath.InverseLerp(val4.y, simPos.y, Floor()))); float2 val7 = initialWorldPosition2d + num7 * val; int2 spatialHash = TerrainManager.GetSpatialHash(val7, terrainSize); TerrainLayer val8 = (TerrainLayer)(-1); LevelHazardType val9 = (LevelHazardType)(-1); OutOfBoundsHazard val10 = (OutOfBoundsHazard)(-1); JobsTerrain val11 = default(JobsTerrain); if (spatiallyHashedTerrains.TryGetValue(spatialHash, ref val11)) { float heightAt = ((JobsTerrain)(ref val11)).GetHeightAt(val7, allTerrainHeights); float3 val12 = default(float3); ((float3)(ref val12))..ctor(val7.x, heightAt, val7.y); int overrideGlobalLayerIndexAt = ((JobsTerrain)(ref val11)).GetOverrideGlobalLayerIndexAt(val7, allTerrainOverrides); bool flag = default(bool); float num8 = default(float); LevelHazardType val13 = default(LevelHazardType); int num9 = default(int); if (overrideGlobalLayerIndexAt >= 0) { val8 = (TerrainLayer)overrideGlobalLayerIndexAt; } else if (BoundsJobHelper.IsInOrOverLevelHazard(ref val12, ref levelHazards, ref flag, ref num8, ref val13, ref num9) && !flag) { val9 = val13; } else { OutOfBoundsHazard val14 = default(OutOfBoundsHazard); BoundsJobHelper.IsInOutOfBoundsHazard(ref val12, ref secondaryOutOfBoundsHazards, mainOutOfBoundsHazardHeight, mainOutOfBoundsHazardType, ref num8, ref val14, ref num9); if ((int)val14 >= 0) { val10 = val14; } else { int dominantLayerLevelIndexAt = ((JobsTerrain)(ref val11)).GetDominantLayerLevelIndexAt(val7, allTerrainLayerWeights); int num10 = default(int); if (globalTerrainLayerIndicesPerLevelTerrainLayer.TryGetValue(dominantLayerLevelIndexAt, ref num10)) { val8 = (TerrainLayer)num10; } } } } estimatedDistances[initialSpeedIndex] = new SwingDistanceEstimation(num7, val8, val9, val10); float Floor() { if (!(ledgeX > 0f) || !(simPos.x > ledgeX)) { return 0f; } return us.flagPosition.y; } } } namespace Md.PlayerGolfer { internal static class _OnBUpdate_g__UpdateHoleDistanceEstimationForOwnBall_184_4 { public delegate void PrefixSignature(PlayerGolfer self); public delegate void PostfixSignature(PlayerGolfer self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook(Target(), (Delegate)hook, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(PlayerGolfer); MethodInfo method = typeFromHandle.GetMethod("g__UpdateHoleDistanceEstimationForOwnBall|184_4", (BindingFlags)(-1), null, Array.Empty(), null); if ((object)method == null) { throw new MissingMethodException("PlayerGolfer", "g__UpdateHoleDistanceEstimationForOwnBall|184_4"); } return method; } } internal static class get_PlayerInfo { } internal static class set_PlayerInfo { } internal static class get_IsInitialized { } internal static class get_OwnBall { } internal static class get_LocalPlayerLatestImmediateEliminationReason { } internal static class set_LocalPlayerLatestImmediateEliminationReason { } internal static class get_LocalPlayerLatestEliminationPosition { } internal static class set_LocalPlayerLatestEliminationPosition { } internal static class get_LocalPlayerEliminationTimestamp { } internal static class set_LocalPlayerEliminationTimestamp { } internal static class get_CurrentMatchResolutionReaction { } internal static class set_CurrentMatchResolutionReaction { } internal static class get_SwingNormalizedPower { } internal static class set_SwingNormalizedPower { } internal static class get_SwingNormalizedCharge { } internal static class set_SwingNormalizedCharge { } internal static class get_SwingPitch { } internal static class set_SwingPitch { } internal static class get_ServerOutOfBoundsTimerEliminationTimestamp { } internal static class set_ServerOutOfBoundsTimerEliminationTimestamp { } internal static class get_IsAimingSwing { } internal static class set_IsAimingSwing { } internal static class get_IsChargingSwing { } internal static class set_IsChargingSwing { } internal static class get_IsSwinging { } internal static class set_IsSwinging { } internal static class get_LastSwingChargeCancelFromInputFrame { } internal static class set_LastSwingChargeCancelFromInputFrame { } internal static class get_LockOnTarget { } internal static class set_LockOnTarget { } internal static class get_IsActiveOnGreen { } internal static class set_IsActiveOnGreen { } internal static class get_IsAheadOfBall { } internal static class get_MatchResolution { } internal static class get_IsMatchResolved { } internal static class get_ClubVfxSettings { } internal static class add_Initialized { } internal static class remove_Initialized { } internal static class add_MatchResolutionChanged { } internal static class remove_MatchResolutionChanged { } internal static class add_IsAheadOfBallChanged { } internal static class remove_IsAheadOfBallChanged { } internal static class add_IsAimingSwingChanged { } internal static class remove_IsAimingSwingChanged { } internal static class add_IsChargingSwingChanged { } internal static class remove_IsChargingSwingChanged { } internal static class add_IsSwingingChanged { } internal static class remove_IsSwingingChanged { } internal static class add_LocalPlayerOwnBallChanged { } internal static class remove_LocalPlayerOwnBallChanged { } internal static class add_LocalPlayerIsAimingSwingChanged { } internal static class remove_LocalPlayerIsAimingSwingChanged { } internal static class add_LocalPlayerStartedChargingSwing { } internal static class remove_LocalPlayerStartedChargingSwing { } internal static class add_LocalPlayerStoppedChargingSwing { } internal static class remove_LocalPlayerStoppedChargingSwing { } internal static class add_LocalPlayerMatchResolutionChanged { } internal static class remove_LocalPlayerMatchResolutionChanged { } internal static class add_PlayerHitOwnBall { } internal static class remove_PlayerHitOwnBall { } internal static class add_AnyPlayerMatchResolutionChanged { } internal static class remove_AnyPlayerMatchResolutionChanged { } internal static class add_AnyPlayerEliminated { } internal static class remove_AnyPlayerEliminated { } internal static class add_LocalPlayerAheadOfBallChanged { } internal static class remove_LocalPlayerAheadOfBallChanged { } internal static class ReturnBallToPlayer { } internal static class FinishHole { } internal static class CmdReturnBallToPlayerFromConsole { } internal static class CmdRestartBall { } internal static class ServerReturnBallToPlayer { } internal static class CmdFinishHole { } internal static class InitializeStatics { } internal static class Awake { } internal static class OnWillBeDestroyed { } internal static class OnStartServer { } internal static class OnStopServer { } internal static class OnStartClient { } internal static class OnStopClient { } internal static class OnStartLocalPlayer { } internal static class OnStopLocalPlayer { } internal static class OnBUpdate { } internal static class ServerInitializeAsParticipant { } internal static class ServerInitializeAsSpectator { } internal static class ServerSpawnBall { } internal static class OnGuidChanged { } internal static class InformEnteredGolfCart { } internal static class TryReactToBlownAirhorn { } internal static class InformScored { } internal static class InformCourseStateChanged { } internal static class InformLocalPlayerIsHoldingAimChanged { } internal static class InformLocalPlayerIsRespawningChanged { } internal static class InformLocalPlayerKnockedOut { } internal static class InformLocalPlayerStartedDiving { } internal static class InformIsInJumboBurgerGiantFormChanged { } internal static class ServerEliminate { } internal static class RpcInformWillBeEliminated { } internal static class OnLocalPlayerWillBeEliminated { } internal static class GetEliminationReason { } internal static class CmdSetPotentialEliminationReason { } internal static class ServerSetPotentialEliminationReason { } internal static class ServerClearPotentialEliminationResponsibility { } internal static class SetPitch { } internal static class ApplySwingPitchPreset { } internal static class GetSwingPreset { } internal static class CycleSwingPitchPreset { } internal static class TryStartChargingSwing { } internal static class ReleaseSwingCharge { } internal static class ReleaseSwingChargeInternal { } internal static class SwingRoutine { } internal static class CmdPlaySwingVfxForAllClients { } internal static class RpcPlaySwingVfx { } internal static class PlaySwingVfxInternal { } internal static class CmdPlayRocketDriverPostHitSpinEffectsForAllClients { } internal static class RpcPlayRocketDriverPostHitSpinEffects { } internal static class PlayRocketDriverPostHitSpinEffectsInternal { } internal static class CmdPlayRocketDriverMissVfxForAllClients { } internal static class RpcPlayRocketDriverMissVfx { } internal static class PlayRocketDriverMissVfxInternal { } internal static class GetSwingType { } internal static class CancelAllActions { } internal static class TryCancelSwingCharge { } internal static class CancelSwing { } internal static class SetIsSwinging { } internal static class OnFinishedSwinging { } internal static class CmdInformHitOwnBall { } internal static class OnPlayerHitOwnBall { } internal static class TryGetBestLockOnTarget { } internal static class CanHitCollider { } internal static class SetPitchInternal { } internal static class GetPitchPresetIndex { } internal static class UpdateIsAimingSwing { } internal static class CanAimSwing { } internal static class SetIsChargingSwing { } internal static class SetLockOnTarget { } internal static class ServerTrySetMatchResolution { } internal static class SetMatchResolutionInternal { } internal static class UpdateSwingNormalizedPower { } internal static class GetSwingHitBox { } internal static class GetSwingDirection { } internal static class GetSwingHittablePriority { } internal static class LocalPlayerCurrentDesiredOverchargedVfxSwingType { } internal static class UpdateCurrentlyPlayingOverchargedVfxSwingType { } internal static class ClearOverchargedVfx { } internal static class ServerUpdateIsActiveOnGreen { } internal static class LocalPlayerUpdateMatchResolutionReaction { } internal static class IsAimingSwingNetworked { } internal static class CanRotate { } internal static class CanMove { } internal static class CanInterruptSwing { } internal static class OnServerWasHitByItem { } internal static class OnServerWasHitByRocketLauncherBackBlast { } internal static class OnServerWasHitByRocketDriverSwingPostHitSpin { } internal static class OnServerWasHitByDive { } internal static class OnServerIsOnGreenChanged { } internal static class OnServerBoundsStateChanged { } internal static class OnServerMatchStateChanged { } internal static class OnLocalPlayerIsGroundedChanged { } internal static class OnLocalPlayerIsKnockedOutChanged { } internal static class OnLocalPlayerFrozenStateChanged { } internal static class OnLocalPlayerEquippedItemChanged { } internal static class OnLockOnTargetWillBeDestroyed { } internal static class OnLockOnTargetPlayerIsVisibleChanged { } internal static class OnLockOnTargetPlayerHasKnockoutImmunityChanged { } internal static class OnLockOnTargetPlayerMatchResolutionChanged { } internal static class OnIsInitializedChanged { } internal static class OnOwnBallChanged { } internal static class UpdateSwingStanceButtonPrompt { } internal static class UpdateAdjustAnglePrompt { } internal static class OnLocalPlayerMatchStateChanged { } internal static class OnMatchScoredTeamsChanged { } internal static class OnIsAheadOfBallChanged { } internal static class _ctor { } internal static class _cctor { } internal static class _OnWillBeDestroyed_g__ReturnButtonPrompts_177_0 { } internal static class _OnBUpdate_g__ServerUpdatePotentialEliminationReason_184_0 { } internal static class _OnBUpdate_g__IsAheadOfBall_184_1 { } internal static class _OnBUpdate_g__UpdateSwingTrajectoryPreview_184_2 { } internal static class _OnBUpdate_g__UpdateLockOn_184_3 { } internal static class _ServerInitializeAsParticipant_g__ClaimTee_185_0 { } internal static class _ServerInitializeAsParticipant_g__SpawnBallOnTee_185_1 { } internal static class _ServerInitializeAsSpectator_g__GetMatchResolution_186_0 { } internal static class _ServerInitializeAsSpectator_g__GetIntendedMatchResolution_186_1 { } internal static class _ServerEliminate_g__CanRespawn_198_0 { } internal static class _ServerEliminate_g__ShouldRespawnImmediately_198_1 { } internal static class _ServerEliminate_g__ReportElimination_198_2 { } internal static class _TryStartChargingSwing_g__CanStartSwing_209_0 { } internal static class _ReleaseSwingChargeInternal_g__CanReleaseSwingCharge_211_0 { } internal static class _SwingRoutine_g__GetEffectiveLockOnTargetSwingPitchFor_212_0 { } internal static class _SwingRoutine_g__ShouldInterruptSwing_212_1 { } internal static class _SwingRoutine_g__TryPlaySwingVfx_212_2 { } internal static class _SwingRoutine_g__PlaySwingVfxForAllClients_212_3 { } internal static class _SwingRoutine_g__ApplyRocketDriverSwingPostHitSpin_212_4 { } internal static class _PlaySwingVfxInternal_g__PlayRegularSwing_215_0 { } internal static class _PlaySwingVfxInternal_g__PlayRocketDriverSwing_215_1 { } internal static class _UpdateIsAimingSwing_g__ShouldAimSwing_234_0 { } internal static class _ServerTrySetMatchResolution_g__CanSetResolution_238_0 { } internal static class _SetMatchResolutionInternal_g__OnLocalPlayerMatchResolved_239_0 { } internal static class _LocalPlayerCurrentDesiredOverchargedVfxSwingType_g__GetSwingType_244_0 { } internal static class _UpdateCurrentlyPlayingOverchargedVfxSwingType_g__PlayOverchargedVfx_245_0 { } internal static class _ServerUpdateIsActiveOnGreen_g__IsActiveOnGreen_247_0 { } internal static class _LocalPlayerUpdateMatchResolutionReaction_g__GetReaction_248_0 { } internal static class _LocalPlayerUpdateMatchResolutionReaction_g__TryGetTeamReaction_248_1 { } internal static class _LocalPlayerUpdateMatchResolutionReaction_g__SetReaction_248_2 { } internal static class _OnServerWasHitByItem_g__CanBeEliminatedByHit_253_0 { } internal static class _OnServerWasHitByItem_g__TryAwardJustAFleshWoundAchievemnt_253_1 { } internal static class _UpdateAdjustAnglePrompt_g__ReturnPrompt_271_0 { } internal static class Weaved { } internal static class get_NetworkisInitialized { } internal static class set_NetworkisInitialized { } internal static class get_NetworkownTee { } internal static class set_NetworkownTee { } internal static class get_NetworkownBall { } internal static class set_NetworkownBall { } internal static class get_NetworkisAheadOfBall { } internal static class set_NetworkisAheadOfBall { } internal static class UserCode_CmdReturnBallToPlayerFromConsole { } internal static class InvokeUserCode_CmdReturnBallToPlayerFromConsole { } internal static class UserCode_CmdRestartBall { } internal static class InvokeUserCode_CmdRestartBall { } internal static class UserCode_CmdFinishHole { } internal static class InvokeUserCode_CmdFinishHole { } internal static class UserCode_RpcInformWillBeEliminated__EliminationReason__Vector3 { } internal static class InvokeUserCode_RpcInformWillBeEliminated__EliminationReason__Vector3 { } internal static class UserCode_CmdSetPotentialEliminationReason__PlayerGolfer__ItemUseId__EliminationReason { } internal static class InvokeUserCode_CmdSetPotentialEliminationReason__PlayerGolfer__ItemUseId__EliminationReason { } internal static class UserCode_CmdPlaySwingVfxForAllClients__Single__Boolean__Boolean__SwingType__NetworkConnectionToClient { } internal static class InvokeUserCode_CmdPlaySwingVfxForAllClients__Single__Boolean__Boolean__SwingType__NetworkConnectionToClient { } internal static class UserCode_RpcPlaySwingVfx__NetworkConnectionToClient__Single__Boolean__Boolean__SwingType { } internal static class InvokeUserCode_RpcPlaySwingVfx__NetworkConnectionToClient__Single__Boolean__Boolean__SwingType { } internal static class UserCode_CmdPlayRocketDriverPostHitSpinEffectsForAllClients__NetworkConnectionToClient { } internal static class InvokeUserCode_CmdPlayRocketDriverPostHitSpinEffectsForAllClients__NetworkConnectionToClient { } internal static class UserCode_RpcPlayRocketDriverPostHitSpinEffects__NetworkConnectionToClient { } internal static class InvokeUserCode_RpcPlayRocketDriverPostHitSpinEffects__NetworkConnectionToClient { } internal static class UserCode_CmdPlayRocketDriverMissVfxForAllClients__Vector3__NetworkConnectionToClient { } internal static class InvokeUserCode_CmdPlayRocketDriverMissVfxForAllClients__Vector3__NetworkConnectionToClient { } internal static class UserCode_RpcPlayRocketDriverMissVfx__NetworkConnectionToClient__Vector3 { } internal static class InvokeUserCode_RpcPlayRocketDriverMissVfx__NetworkConnectionToClient__Vector3 { } internal static class UserCode_CmdInformHitOwnBall { } internal static class InvokeUserCode_CmdInformHitOwnBall { } internal static class SerializeSyncVars { } internal static class DeserializeSyncVars { } internal static class SwingDistanceEstimation { internal static class _ctor { } internal static class _ctor_System_Single_TerrainLayer_LevelHazardType_OutOfBoundsHazard { } } internal static class TerrainLayerNormalizedSwingPower { internal static class _ctor { } internal static class get_Invalid { } internal static class IsInvalid { } } internal static class TerrainLayerNormalizedSwingPowerComparer { internal static class _ctor { } internal static class Compare { } } internal static class __c__DisplayClass186_0 { internal static class _ctor { } } internal static class __c__DisplayClass198_0 { internal static class _ctor { } } internal static class __c__DisplayClass212_0 { internal static class _ctor { } } internal static class __c__DisplayClass215_0 { internal static class _ctor { } } internal static class __c__DisplayClass238_0 { internal static class _ctor { } } internal static class __c__DisplayClass253_0 { internal static class _ctor { } } internal static class _SwingRoutine_d__212 { internal static class _ctor { } internal static class System_IDisposable_Dispose { } internal static class MoveNext { } internal static class System_Collections_Generic_IEnumerator_System_Object__get_Current { } internal static class System_Collections_IEnumerator_Reset { } internal static class System_Collections_IEnumerator_get_Current { } } } namespace MonoDetour.HookGen { internal static class DefaultMonoDetourManager { internal static MonoDetourManager Instance { get; } = New(); internal static MonoDetourManager New() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown return new MonoDetourManager(typeof(DefaultMonoDetourManager).Assembly.GetName().Name); } } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = true, Inherited = false)] internal class MonoDetourTargetsAttribute(Type? targetType = null) : Attribute(), IMonoDetourTargets { public Type? TargetType { get; } = targetType; public bool IncludeNestedTypes { get; set; } = true; public string[]? Members { get; set; } public string[]? MemberNamePrefixes { get; set; } public string[]? MemberNameSuffixes { get; set; } public bool GenerateControlFlowVariants { get; set; } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Embedded] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Embedded] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace Microsoft.CodeAnalysis { [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace BetterDistanceEstimation { [MonoDetourTargets(typeof(PlayerGolfer))] public class PlayerGolferHooks { [CompilerGenerated] private static class <>O { public static Manipulator <0>__ILHook_CallOurJob; public static Func <1>__Schedule; } [MonoDetourHookInitialize] private static void Init() { //IL_0010: 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_001b: Expected O, but got Unknown object obj = <>O.<0>__ILHook_CallOurJob; if (obj == null) { Manipulator val = ILHook_CallOurJob; <>O.<0>__ILHook_CallOurJob = val; obj = (object)val; } _OnBUpdate_g__UpdateHoleDistanceEstimationForOwnBall_184_4.ILHook((Manipulator)obj); } private static void ILHook_CallOurJob(ILManipulationInfo info) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) ILWeaver w = new ILWeaver(info); Instruction start = null; Vector3 val = default(Vector3); w.MatchRelaxed(new Predicate[6] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 301) && w.SetInstructionTo(ref start, x), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdloca(x, 15), (Instruction x) => ILPatternMatchingExt.MatchInitobj(x, ref val), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 15), (Instruction x) => ILPatternMatchingExt.MatchCall(x, (MethodBase)new Func(IJobParallelForExtensions.Schedule).Method) && w.SetCurrentTo(x) }).ThrowIfFailure(); w.RemoveRangeAndShiftLabels(start, w.Current); w.InsertBeforeCurrent((IEnumerable)new <>z__ReadOnlyArray((InstructionOrEnumerable[])(object)new InstructionOrEnumerable[2] { InstructionOrEnumerable.op_Implicit(w.Create(OpCodes.Ldarg, 0)), InstructionOrEnumerable.op_Implicit(w.CreateDelegateCall>((Func)delegate(CalculateFirstGroundHitDistancesJob origJob, PlayerGolfer that) { //IL_000a: 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_0024: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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) //IL_0040: Unknown result type (might be due to invalid IL or missing references) val = ((Component)GolfHoleManager.MainHole).transform.position - ((Component)that.NetworkownBall).transform.position; return IJobParallelForExtensions.Schedule(new LyricLyFirstGroundHitDistancesJob(origJob, float3.op_Implicit(val)), 301, 1, default(JobHandle)); })) })); } } [BepInPlugin("com.github.LyricLy.BetterDistanceEstimation", "BetterDistanceEstimation", "0.2.8")] public class Plugin : BaseUnityPlugin { public const string Id = "com.github.LyricLy.BetterDistanceEstimation"; public static string Name => "BetterDistanceEstimation"; public static string Version => "0.2.8"; private void Awake() { MonoDetourManager.InvokeHookInitializers(Assembly.GetExecutingAssembly()); } } } namespace System.Diagnostics.CodeAnalysis { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ConstantExpectedAttribute : Attribute { public object? Min { get; set; } public object? Max { get; set; } } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ExperimentalAttribute : Attribute { public string DiagnosticId { get; } public string? UrlFormat { get; set; } public ExperimentalAttribute(string diagnosticId) { DiagnosticId = diagnosticId; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] [ExcludeFromCodeCoverage] internal sealed class MemberNotNullAttribute : Attribute { public string[] Members { get; } public MemberNotNullAttribute(string member) { Members = new string[1] { member }; } public MemberNotNullAttribute(params string[] members) { Members = members; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] [ExcludeFromCodeCoverage] internal sealed class MemberNotNullWhenAttribute : Attribute { public bool ReturnValue { get; } public string[] Members { get; } public MemberNotNullWhenAttribute(bool returnValue, string member) { ReturnValue = returnValue; Members = new string[1] { member }; } public MemberNotNullWhenAttribute(bool returnValue, params string[] members) { ReturnValue = returnValue; Members = members; } } [AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class SetsRequiredMembersAttribute : Attribute { } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class StringSyntaxAttribute : Attribute { public const string CompositeFormat = "CompositeFormat"; public const string DateOnlyFormat = "DateOnlyFormat"; public const string DateTimeFormat = "DateTimeFormat"; public const string EnumFormat = "EnumFormat"; public const string GuidFormat = "GuidFormat"; public const string Json = "Json"; public const string NumericFormat = "NumericFormat"; public const string Regex = "Regex"; public const string TimeOnlyFormat = "TimeOnlyFormat"; public const string TimeSpanFormat = "TimeSpanFormat"; public const string Uri = "Uri"; public const string Xml = "Xml"; public string Syntax { get; } public object?[] Arguments { get; } public StringSyntaxAttribute(string syntax) { Syntax = syntax; Arguments = new object[0]; } public StringSyntaxAttribute(string syntax, params object?[] arguments) { Syntax = syntax; Arguments = arguments; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class UnscopedRefAttribute : Attribute { } } namespace System.Runtime.Versioning { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class RequiresPreviewFeaturesAttribute : Attribute { public string? Message { get; } public string? Url { get; set; } public RequiresPreviewFeaturesAttribute() { } public RequiresPreviewFeaturesAttribute(string? message) { Message = message; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CallerArgumentExpressionAttribute : Attribute { public string ParameterName { get; } public CallerArgumentExpressionAttribute(string parameterName) { ParameterName = parameterName; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CollectionBuilderAttribute : Attribute { public Type BuilderType { get; } public string MethodName { get; } public CollectionBuilderAttribute(Type builderType, string methodName) { BuilderType = builderType; MethodName = methodName; } } [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CompilerFeatureRequiredAttribute : Attribute { public const string RefStructs = "RefStructs"; public const string RequiredMembers = "RequiredMembers"; public string FeatureName { get; } public bool IsOptional { get; set; } public CompilerFeatureRequiredAttribute(string featureName) { FeatureName = featureName; } } [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute { public string[] Arguments { get; } public InterpolatedStringHandlerArgumentAttribute(string argument) { Arguments = new string[1] { argument }; } public InterpolatedStringHandlerArgumentAttribute(params string[] arguments) { Arguments = arguments; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class InterpolatedStringHandlerAttribute : Attribute { } [EditorBrowsable(EditorBrowsableState.Never)] [ExcludeFromCodeCoverage] internal static class IsExternalInit { } [AttributeUsage(AttributeTargets.Method, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ModuleInitializerAttribute : Attribute { } [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class OverloadResolutionPriorityAttribute : Attribute { public int Priority { get; } public OverloadResolutionPriorityAttribute(int priority) { Priority = priority; } } [AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)] [ExcludeFromCodeCoverage] internal sealed class ParamCollectionAttribute : Attribute { } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class RequiredMemberAttribute : Attribute { } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] [EditorBrowsable(EditorBrowsableState.Never)] [ExcludeFromCodeCoverage] internal sealed class RequiresLocationAttribute : Attribute { } [AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class SkipLocalsInitAttribute : Attribute { } } [CompilerGenerated] internal sealed class <>z__ReadOnlyArray : IEnumerable, ICollection, IList, IEnumerable, IReadOnlyCollection, IReadOnlyList, ICollection, IList { int ICollection.Count => _items.Length; bool ICollection.IsSynchronized => false; object ICollection.SyncRoot => this; object IList.this[int index] { get { return _items[index]; } set { throw new NotSupportedException(); } } bool IList.IsFixedSize => true; bool IList.IsReadOnly => true; int IReadOnlyCollection.Count => _items.Length; T IReadOnlyList.this[int index] => _items[index]; int ICollection.Count => _items.Length; bool ICollection.IsReadOnly => true; T IList.this[int index] { get { return _items[index]; } set { throw new NotSupportedException(); } } public <>z__ReadOnlyArray(T[] items) { _items = items; } IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)_items).GetEnumerator(); } void ICollection.CopyTo(Array array, int index) { ((ICollection)_items).CopyTo(array, index); } int IList.Add(object value) { throw new NotSupportedException(); } void IList.Clear() { throw new NotSupportedException(); } bool IList.Contains(object value) { return ((IList)_items).Contains(value); } int IList.IndexOf(object value) { return ((IList)_items).IndexOf(value); } void IList.Insert(int index, object value) { throw new NotSupportedException(); } void IList.Remove(object value) { throw new NotSupportedException(); } void IList.RemoveAt(int index) { throw new NotSupportedException(); } IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)_items).GetEnumerator(); } void ICollection.Add(T item) { throw new NotSupportedException(); } void ICollection.Clear() { throw new NotSupportedException(); } bool ICollection.Contains(T item) { return ((ICollection)_items).Contains(item); } void ICollection.CopyTo(T[] array, int arrayIndex) { ((ICollection)_items).CopyTo(array, arrayIndex); } bool ICollection.Remove(T item) { throw new NotSupportedException(); } int IList.IndexOf(T item) { return ((IList)_items).IndexOf(item); } void IList.Insert(int index, T item) { throw new NotSupportedException(); } void IList.RemoveAt(int index) { throw new NotSupportedException(); } }