Decompiled source of wpotank gunbolt feedback v1.1.0

meatkit.dll

Decompiled 8 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using FistVR;
using On.FistVR;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("meatkit")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("meatkit")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("23909a7e-3ada-4ed7-a519-6416357ee202")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
public class Mag_vel_tracker : MonoBehaviour
{
	public Vector3 bolt_velocity;

	private Vector3 boltpos;

	private Vector3 boltposprev;

	private void Start()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		boltpos = ((Component)this).transform.position;
		boltposprev = boltpos;
	}

	private void Update()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: 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_0025: 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_002f: 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)
		boltposprev = boltpos;
		boltpos = ((Component)this).transform.position;
		bolt_velocity = boltpos - boltposprev;
		Debug.Log((object)bolt_velocity);
	}
}
public class Shell_vel_tracker : MonoBehaviour
{
	public Vector3 bolt_velocity;

	private Vector3 boltpos;

	private Vector3 boltposprev;

	private void Start()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		boltpos = ((Component)this).transform.position;
		boltposprev = boltpos;
	}

	private void Update()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: 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_0025: 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_002f: 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)
		boltposprev = boltpos;
		boltpos = ((Component)this).transform.position;
		bolt_velocity = boltpos - boltposprev;
		Debug.Log((object)bolt_velocity);
	}
}
public class Velocityhandlerevolver : MonoBehaviour
{
	private float bolt;

	public float bolt_velocity;

	private float boltpos;

	private float boltposprev;

	private void Start()
	{
		bolt = ((Component)this).gameObject.GetComponent<Revolver>().CylinderArmRot;
		boltpos = bolt;
		boltposprev = boltpos;
	}

	private void Update()
	{
		bolt = ((Component)this).gameObject.GetComponent<Revolver>().CylinderArmRot;
		boltposprev = boltpos;
		boltpos = bolt;
		bolt_velocity = boltpos - boltposprev;
		Debug.Log((object)bolt_velocity);
	}
}
public class Velocityhandlehandgun : MonoBehaviour
{
	private HandgunSlide bolt;

	public float bolt_velocity;

	private float boltpos;

	private float boltposprev;

	private Vector3 boltacpos;

	public float bolt_velocityrot;

	private float boltrot;

	private float boltrotprev;

	private void Start()
	{
		bolt = ((Component)this).gameObject.GetComponent<Handgun>().Slide;
		boltpos = bolt.m_slideZ_current;
		boltposprev = boltpos;
	}

	private void Update()
	{
		boltposprev = boltpos;
		boltpos = bolt.m_slideZ_current;
		bolt_velocity = boltpos - boltposprev;
		Debug.Log((object)bolt_velocity);
	}
}
public class Velocityhandlebolt : MonoBehaviour
{
	private BoltActionRifle_Handle bolt;

	public float bolt_velocity;

	private float boltpos;

	private float boltposprev;

	private Vector3 boltacpos;

	public float bolt_velocityrot;

	private float boltrot;

	private float boltrotprev;

	private void Start()
	{
		//IL_0028: 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)
		bolt = ((Component)this).gameObject.GetComponent<BoltActionRifle>().BoltHandle;
		boltpos = ((Component)this).transform.InverseTransformPoint(((Component)bolt).transform.position).z;
		boltposprev = boltpos;
	}

	private void Update()
	{
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: 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_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: 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_00f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0157: 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_0115: Unknown result type (might be due to invalid IL or missing references)
		//IL_0120: Unknown result type (might be due to invalid IL or missing references)
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_0179: Unknown result type (might be due to invalid IL or missing references)
		//IL_0184: Unknown result type (might be due to invalid IL or missing references)
		//IL_018e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0194: Unknown result type (might be due to invalid IL or missing references)
		//IL_0206: Unknown result type (might be due to invalid IL or missing references)
		//IL_0211: Unknown result type (might be due to invalid IL or missing references)
		//IL_021b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0253: Unknown result type (might be due to invalid IL or missing references)
		//IL_025e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0268: Unknown result type (might be due to invalid IL or missing references)
		boltposprev = boltpos;
		boltpos = ((Component)this).transform.InverseTransformPoint(((Component)bolt).transform.position).z;
		bolt_velocity = boltpos - boltposprev;
		boltrotprev = boltrot;
		boltrot = bolt.rotAngle;
		bolt_velocityrot = boltrot - boltrotprev;
		Debug.Log((object)boltpos);
		boltacpos = ((Component)bolt).transform.position;
		((Component)this).gameObject.GetComponent<Rigidbody>().AddForceAtPosition(((Component)this).gameObject.transform.forward * bolt_velocity * 10000f, boltacpos, (ForceMode)5);
		if (boltpos == ((Component)this).transform.InverseTransformPoint(((Component)bolt.Point_Rearward).transform.position).z)
		{
			((Component)this).gameObject.GetComponent<Rigidbody>().AddForceAtPosition(((Component)this).transform.forward * bolt_velocity * 2500f, boltacpos, (ForceMode)2);
		}
		if (boltpos == ((Component)this).transform.InverseTransformPoint(((Component)bolt.Point_Forward).transform.position).z)
		{
			((Component)this).gameObject.GetComponent<Rigidbody>().AddForceAtPosition(((Component)this).transform.forward * bolt_velocity * 2500f, boltacpos, (ForceMode)2);
		}
		((Component)this).gameObject.GetComponent<Rigidbody>().AddRelativeTorque(new Vector3(0f, 0f, 1f) * bolt_velocityrot * 25f, (ForceMode)5);
		if (boltrot == bolt.MaxRot)
		{
			((Component)this).gameObject.GetComponent<Rigidbody>().AddRelativeTorque(new Vector3(0f, 0f, 1f) * bolt_velocityrot * 2f, (ForceMode)2);
		}
		if (boltpos == bolt.MinRot)
		{
			((Component)this).gameObject.GetComponent<Rigidbody>().AddRelativeTorque(new Vector3(0f, 0f, 1f) * bolt_velocityrot * 2f, (ForceMode)2);
		}
	}
}
public class Velocityhandleopen : MonoBehaviour
{
	private OpenBoltReceiverBolt bolt;

	public float bolt_velocity;

	private float boltpos;

	private float boltposprev;

	private void Start()
	{
		bolt = ((Component)this).gameObject.GetComponent<OpenBoltReceiver>().Bolt;
		boltpos = bolt.m_boltZ_current;
		boltposprev = boltpos;
	}

	private void Update()
	{
		boltposprev = boltpos;
		boltpos = bolt.m_boltZ_current;
		bolt_velocity = boltpos - boltposprev;
		Debug.Log((object)bolt_velocity);
	}
}
public class Velocityhandletube : MonoBehaviour
{
	private TubeFedShotgunBolt bolt;

	public float bolt_velocity;

	private float boltpos;

	private float boltposprev;

	private void Start()
	{
		bolt = ((Component)this).gameObject.GetComponent<TubeFedShotgun>().Bolt;
		boltpos = bolt.m_boltZ_current;
		boltposprev = boltpos;
	}

	private void Update()
	{
		boltposprev = boltpos;
		boltpos = bolt.m_boltZ_current;
		bolt_velocity = boltpos - boltposprev;
		Debug.Log((object)bolt_velocity);
	}
}
public class Velocityhandle : MonoBehaviour
{
	private ClosedBolt bolt;

	public float bolt_velocity;

	private float boltpos;

	private float boltposprev;

	private void Start()
	{
		bolt = ((Component)this).gameObject.GetComponent<ClosedBoltWeapon>().Bolt;
		boltpos = bolt.m_boltZ_current;
		boltposprev = boltpos;
	}

	private void Update()
	{
		boltposprev = boltpos;
		boltpos = bolt.m_boltZ_current;
		bolt_velocity = boltpos - boltposprev;
		Mathf.Clamp(bolt_velocity, -50f, 50f);
		Debug.Log((object)bolt_velocity);
	}
}
namespace Cityrobo;

[BepInPlugin("h3vr.wpotank.Ihavenoideawhatimdoing", "Ihavenoideawhatimdoing", "1.0.0")]
public class Bolt_feedback : BaseUnityPlugin
{
	private float boltpos;

	private float boltposprev;

	private float boltvelocity;

	private Vector3 boltacpos;

	private void Awake()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Expected O, but got Unknown
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Expected O, but got Unknown
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected O, but got Unknown
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Expected O, but got Unknown
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Expected O, but got Unknown
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Expected O, but got Unknown
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Expected O, but got Unknown
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Expected O, but got Unknown
		//IL_008f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Expected O, but got Unknown
		ClosedBoltWeapon.FVRUpdate += new hook_FVRUpdate(ClosedBoltWeapon_FVRUpdate);
		ClosedBoltWeapon.Awake += new hook_Awake(ClosedBoltWeapon_Awake);
		TubeFedShotgun.Awake += new hook_Awake(TubeFedShotgun_Awake);
		TubeFedShotgun.FVRUpdate += new hook_FVRUpdate(TubeFedShotgun_FVRUpdate);
		OpenBoltReceiver.Awake += new hook_Awake(OpenBoltReceiver_Awake);
		OpenBoltReceiver.FVRUpdate += new hook_FVRUpdate(OpenBoltReceiver_FVRUpdate);
		BoltActionRifle.Awake += new hook_Awake(BoltActionRifle_Awake);
		Handgun.Awake += new hook_Awake(Handgun_Awake);
		Handgun.FVRUpdate += new hook_FVRUpdate(Handgun_FVRUpdate);
	}

	private void Handgun_FVRUpdate(orig_FVRUpdate orig, Handgun self)
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: 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_0045: 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_0055: 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_008f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0113: Unknown result type (might be due to invalid IL or missing references)
		//IL_011e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0128: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: 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_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
		boltvelocity = ((Component)self).GetComponent<Velocityhandlehandgun>().bolt_velocity;
		orig.Invoke(self);
		boltacpos = ((Component)self.Slide).transform.position;
		((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 1500f, boltacpos, (ForceMode)5);
		if (self.Slide.m_slideZ_current == self.Slide.m_slideZ_rear)
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 150f, boltacpos, (ForceMode)2);
		}
		if (self.Slide.m_slideZ_current == self.Slide.m_slideZ_forward)
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 150f, boltacpos, (ForceMode)2);
		}
		if (((FVRFireArm)self).IsTwoHandStabilized() || ((FVRFireArm)self).IsForegripStabilized())
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -750f, boltacpos, (ForceMode)5);
			if (self.Slide.m_slideZ_current == self.Slide.m_slideZ_rear)
			{
				((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -75f, boltacpos, (ForceMode)2);
			}
			if (self.Slide.m_slideZ_current == self.Slide.m_slideZ_forward)
			{
				((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -75f, boltacpos, (ForceMode)2);
			}
		}
	}

	private void Handgun_Awake(orig_Awake orig, Handgun self)
	{
		orig.Invoke(self);
		((FVRInteractiveObject)self).GameObject.AddComponent<Velocityhandlehandgun>();
	}

	private void BoltActionRifle_Awake(orig_Awake orig, BoltActionRifle self)
	{
		orig.Invoke(self);
		((FVRInteractiveObject)self).GameObject.AddComponent<Velocityhandlebolt>();
	}

	private void OpenBoltReceiver_FVRUpdate(orig_FVRUpdate orig, OpenBoltReceiver self)
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: 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_0045: 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_0055: 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_008f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0113: Unknown result type (might be due to invalid IL or missing references)
		//IL_011e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0128: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: 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_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
		boltvelocity = ((Component)self).GetComponent<Velocityhandleopen>().bolt_velocity;
		orig.Invoke(self);
		boltacpos = ((Component)self.Bolt).transform.position;
		((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 2500f, boltacpos, (ForceMode)5);
		if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_rear)
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 250f, boltacpos, (ForceMode)2);
		}
		if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_forward)
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 250f, boltacpos, (ForceMode)2);
		}
		if (((FVRFireArm)self).IsTwoHandStabilized() || ((FVRFireArm)self).IsForegripStabilized())
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -1250f, boltacpos, (ForceMode)5);
			if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_rear)
			{
				((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -125f, boltacpos, (ForceMode)2);
			}
			if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_forward)
			{
				((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -125f, boltacpos, (ForceMode)2);
			}
		}
	}

	private void OpenBoltReceiver_Awake(orig_Awake orig, OpenBoltReceiver self)
	{
		orig.Invoke(self);
		((FVRInteractiveObject)self).GameObject.AddComponent<Velocityhandleopen>();
	}

	private void TubeFedShotgun_FVRUpdate(orig_FVRUpdate orig, TubeFedShotgun self)
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: 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_0045: 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_0055: 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_008f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0113: Unknown result type (might be due to invalid IL or missing references)
		//IL_011e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0128: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: 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_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
		boltvelocity = ((Component)self).GetComponent<Velocityhandletube>().bolt_velocity;
		orig.Invoke(self);
		boltacpos = ((Component)self.Bolt).transform.position;
		((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 2500f, boltacpos, (ForceMode)5);
		if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_rear)
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 250f, boltacpos, (ForceMode)2);
		}
		if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_forward)
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 250f, boltacpos, (ForceMode)2);
		}
		if (((FVRFireArm)self).IsTwoHandStabilized() || ((FVRFireArm)self).IsForegripStabilized())
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -1250f, boltacpos, (ForceMode)5);
			if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_rear)
			{
				((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -125f, boltacpos, (ForceMode)2);
			}
			if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_forward)
			{
				((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -125f, boltacpos, (ForceMode)2);
			}
		}
	}

	private void TubeFedShotgun_Awake(orig_Awake orig, TubeFedShotgun self)
	{
		orig.Invoke(self);
		((FVRInteractiveObject)self).GameObject.AddComponent<Velocityhandletube>();
	}

	private void ClosedBoltWeapon_Awake(orig_Awake orig, ClosedBoltWeapon self)
	{
		orig.Invoke(self);
		((FVRInteractiveObject)self).GameObject.AddComponent<Velocityhandle>();
	}

	private void ClosedBoltWeapon_FVRUpdate(orig_FVRUpdate orig, ClosedBoltWeapon self)
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: 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_0045: 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_0055: 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_008f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0113: Unknown result type (might be due to invalid IL or missing references)
		//IL_011e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0128: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: 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_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
		boltvelocity = ((Component)self).GetComponent<Velocityhandle>().bolt_velocity;
		orig.Invoke(self);
		boltacpos = ((Component)self.Bolt).transform.position;
		((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 3000f, boltacpos, (ForceMode)5);
		if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_rear)
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 300f, boltacpos, (ForceMode)2);
		}
		if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_forward)
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * 300f, boltacpos, (ForceMode)2);
		}
		if (((FVRFireArm)self).IsTwoHandStabilized() || ((FVRFireArm)self).IsForegripStabilized())
		{
			((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -1500f, boltacpos, (ForceMode)5);
			if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_rear)
			{
				((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -150f, boltacpos, (ForceMode)2);
			}
			if (self.Bolt.m_boltZ_current == self.Bolt.m_boltZ_forward)
			{
				((Component)self).GetComponent<Rigidbody>().AddForceAtPosition(((Component)self).transform.forward * boltvelocity * -150f, boltacpos, (ForceMode)2);
			}
		}
	}
}