using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BoneLib;
using Il2CppSLZ.Marrow;
using MelonLoader;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(PunchFixPatch6Mod), "PunchFixPatch6", " Only updates on bugs.", "habibis_v", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("PunchFixPatch6")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("PunchFixPatch6")]
[assembly: AssemblyTitle("PunchFixPatch6")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.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]
[Microsoft.CodeAnalysis.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;
}
}
}
public class PunchFixPatch6Mod : MelonMod
{
private static float _origForce = -1f;
private static bool _hasLoggedFully = false;
public static PunchFixPatch6Mod Instance { get; private set; } = null;
public override void OnInitializeMelon()
{
Instance = this;
((MelonBase)this).LoggerInstance.Msg("PunchFixPatch6 loaded partially.");
}
public override void OnUpdate()
{
PhysicsRig physicsRig = Player.PhysicsRig;
object obj;
if (physicsRig == null)
{
obj = null;
}
else
{
Hand leftHand = physicsRig.leftHand;
obj = ((leftHand != null) ? leftHand.physHand : null);
}
PhysHand val = (PhysHand)obj;
PhysicsRig physicsRig2 = Player.PhysicsRig;
object obj2;
if (physicsRig2 == null)
{
obj2 = null;
}
else
{
Hand rightHand = physicsRig2.rightHand;
obj2 = ((rightHand != null) ? rightHand.physHand : null);
}
PhysHand val2 = (PhysHand)obj2;
if (!((Object)(object)val == (Object)null) && !((Object)(object)val2 == (Object)null))
{
if (_origForce < 0f)
{
_origForce = val.xPosForce;
}
float xPosForce = (val.xNegForce = _origForce * 2f);
val.xPosForce = xPosForce;
xPosForce = (val.yNegForce = _origForce * 2f);
val.yPosForce = xPosForce;
xPosForce = (val.zNegForce = _origForce * 2f);
val.zPosForce = xPosForce;
val.maxTorque = 750f;
xPosForce = (val2.xNegForce = _origForce * 2f);
val2.xPosForce = xPosForce;
xPosForce = (val2.yNegForce = _origForce * 2f);
val2.yPosForce = xPosForce;
xPosForce = (val2.zNegForce = _origForce * 2f);
val2.zPosForce = xPosForce;
val2.maxTorque = 750f;
if (!_hasLoggedFully)
{
((MelonBase)this).LoggerInstance.Msg("PunchFixPatch6 loaded fully.");
_hasLoggedFully = true;
}
}
}
}