221 lines
8.2 KiB
C#
221 lines
8.2 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
using RecRoom.Core.Combat;
|
|
using UnityEngine;
|
|
|
|
namespace RecRoom.Tools.Weapons
|
|
{
|
|
// Token: 0x02002C5D RID: 11357
|
|
[Token(Token = "0x2002C5D")]
|
|
public class WeaponStabilizationGrip : WeaponAccessory
|
|
{
|
|
// Token: 0x06012FB3 RID: 77747 RVA: 0x00456090 File Offset: 0x00454290
|
|
[Token(Token = "0x6012FB3")]
|
|
[Address(RVA = "0x1D40FF0", Offset = "0x1D3FFF0", VA = "0x181D40FF0", Slot = "5")]
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
Tool tool = this._tool;
|
|
int num = 0;
|
|
if (tool != num)
|
|
{
|
|
this._tool.IgnorePickupDirection = true;
|
|
Tool tool2 = this._tool;
|
|
MFBGLIHGCGO<Tool> postPickupEvent = tool2.PostPickupEvent;
|
|
Action<Tool> action = new Action(this.HAAIALDMMEL);
|
|
MFBGLIHGCGO<Tool> mfbglihgcgo = MFBGLIHGCGO.BPJDFPACLMK(postPickupEvent, action);
|
|
tool2.PostPickupEvent = mfbglihgcgo;
|
|
Tool tool3 = this._tool;
|
|
MFBGLIHGCGO<Tool> postReleaseEvent = tool3.PostReleaseEvent;
|
|
Action<Tool> action2 = new Action(this.OIOCPLEKMEK);
|
|
MFBGLIHGCGO<Tool> mfbglihgcgo2 = MFBGLIHGCGO.BPJDFPACLMK(postReleaseEvent, action2);
|
|
tool3.PostReleaseEvent = mfbglihgcgo2;
|
|
Tool tool4 = this._tool;
|
|
EAHPNACBLDD<Tool, Vector3, Quaternion, Vector3, bool> postResetEvent = tool4.PostResetEvent;
|
|
Action<Tool, Vector3, Quaternion, Vector3, bool> action3 = new Action(this.LBODGLNOABB);
|
|
EAHPNACBLDD<Tool, Vector3, Quaternion, Vector3, bool> eahpnacbldd = EAHPNACBLDD.BPJDFPACLMK(postResetEvent, action3);
|
|
tool4.PostResetEvent = eahpnacbldd;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06012FB4 RID: 77748 RVA: 0x00456160 File Offset: 0x00454360
|
|
[Token(Token = "0x6012FB4")]
|
|
[Address(RVA = "0x1D418F0", Offset = "0x1D408F0", VA = "0x181D418F0", Slot = "6")]
|
|
protected override void Start()
|
|
{
|
|
RigidbodyPickup rigidbodyPickup = this.parentWeapon._tool.rigidbodyPickup;
|
|
if (rigidbodyPickup == 0)
|
|
{
|
|
}
|
|
this.BJHBHGEIIHN = rigidbodyPickup;
|
|
int num = 0;
|
|
if (!(rigidbodyPickup == num))
|
|
{
|
|
StabilizedRigidbodyPickup bjhbhgeiihn = this.BJHBHGEIIHN;
|
|
Action action = new Action(this.ILGINDIODEP);
|
|
bjhbhgeiihn.DHHHLAHLBGH += action;
|
|
RigidbodyPickup rigidbodyPickup2 = this._tool.rigidbodyPickup;
|
|
if (rigidbodyPickup2 == 0)
|
|
{
|
|
}
|
|
this.POICOHHEPON = rigidbodyPickup2;
|
|
StabilizedRigidbodyPickup bjhbhgeiihn2 = this.BJHBHGEIIHN;
|
|
PlungerRigidbodyPickup poicohhepon = this.POICOHHEPON;
|
|
float z = this.KNHHAPILJGN.z;
|
|
poicohhepon.ConstraintOffsetPosition.z = z;
|
|
PlungerRigidbodyPickup poicohhepon2 = this.POICOHHEPON;
|
|
Quaternion nnjnbdpdafo = this.NNJNBDPDAFO;
|
|
poicohhepon2.ConstraintOffsetRotation = nnjnbdpdafo;
|
|
PlungerRigidbodyPickup poicohhepon3 = this.POICOHHEPON;
|
|
float z2 = Vector3.forward.z;
|
|
poicohhepon3.ConstraintLocalAxis.z = z2;
|
|
this.POICOHHEPON.MinimumConstraintDistance = 0f;
|
|
this.POICOHHEPON.MaximumConstraintDistance = 0f;
|
|
if (!this._tool.<BIPMAHKMNKF>k__BackingField)
|
|
{
|
|
base.NNPBKEIEMHL();
|
|
}
|
|
base.Start();
|
|
return;
|
|
}
|
|
Debug.LogError(this.parentWeapon.name + "missing stabilizer rigidbody pickup.");
|
|
}
|
|
|
|
// Token: 0x06012FB5 RID: 77749 RVA: 0x00456298 File Offset: 0x00454498
|
|
[Token(Token = "0x6012FB5")]
|
|
[Address(RVA = "0x1346B00", Offset = "0x1345B00", VA = "0x181346B00")]
|
|
private void OnEnable()
|
|
{
|
|
if (!this._tool.<BIPMAHKMNKF>k__BackingField)
|
|
{
|
|
base.NNPBKEIEMHL();
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06012FB6 RID: 77750 RVA: 0x004562C0 File Offset: 0x004544C0
|
|
[Token(Token = "0x6012FB6")]
|
|
[Address(RVA = "0x1D416F0", Offset = "0x1D406F0", VA = "0x181D416F0", Slot = "7")]
|
|
protected override void OnDestroy()
|
|
{
|
|
base.OnDestroy();
|
|
Tool tool = this._tool;
|
|
int num = 0;
|
|
if (tool != num)
|
|
{
|
|
Tool tool2 = this._tool;
|
|
MFBGLIHGCGO<Tool> postPickupEvent = tool2.PostPickupEvent;
|
|
Action<Tool> action = new Action(this.HAAIALDMMEL);
|
|
MFBGLIHGCGO<Tool> mfbglihgcgo = MFBGLIHGCGO.GMNMHGMFGOL(postPickupEvent, action);
|
|
tool2.PostPickupEvent = mfbglihgcgo;
|
|
Tool tool3 = this._tool;
|
|
MFBGLIHGCGO<Tool> postReleaseEvent = tool3.PostReleaseEvent;
|
|
Action<Tool> action2 = new Action(this.OIOCPLEKMEK);
|
|
MFBGLIHGCGO<Tool> mfbglihgcgo2 = MFBGLIHGCGO.GMNMHGMFGOL(postReleaseEvent, action2);
|
|
tool3.PostReleaseEvent = mfbglihgcgo2;
|
|
Tool tool4 = this._tool;
|
|
EAHPNACBLDD<Tool, Vector3, Quaternion, Vector3, bool> postResetEvent = tool4.PostResetEvent;
|
|
Action<Tool, Vector3, Quaternion, Vector3, bool> action3 = new Action(this.LBODGLNOABB);
|
|
EAHPNACBLDD<Tool, Vector3, Quaternion, Vector3, bool> eahpnacbldd = EAHPNACBLDD.GMNMHGMFGOL(postResetEvent, action3);
|
|
tool4.PostResetEvent = eahpnacbldd;
|
|
}
|
|
StabilizedRigidbodyPickup bjhbhgeiihn = this.BJHBHGEIIHN;
|
|
int num2 = 0;
|
|
if (bjhbhgeiihn != num2)
|
|
{
|
|
StabilizedRigidbodyPickup bjhbhgeiihn2 = this.BJHBHGEIIHN;
|
|
Action action4 = new Action(this.ILGINDIODEP);
|
|
bjhbhgeiihn2.DHHHLAHLBGH -= action4;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06012FB7 RID: 77751 RVA: 0x004563BC File Offset: 0x004545BC
|
|
[Token(Token = "0x6012FB7")]
|
|
[Address(RVA = "0x1D41190", Offset = "0x1D40190", VA = "0x181D41190")]
|
|
private void HAAIALDMMEL(Tool EGFEJGHDNAI)
|
|
{
|
|
PlayerHand <PBCNKLKCIHJ>k__BackingField = this._tool.<PBCNKLKCIHJ>k__BackingField;
|
|
int num = 0;
|
|
if (!(<PBCNKLKCIHJ>k__BackingField == num))
|
|
{
|
|
PlayerHand <PBCNKLKCIHJ>k__BackingField2 = this._tool.<PBCNKLKCIHJ>k__BackingField;
|
|
StabilizedRigidbodyPickup bjhbhgeiihn = this.BJHBHGEIIHN;
|
|
RigidbodyEx rigidbodyEx = <PBCNKLKCIHJ>k__BackingField2._rigidbodyEx;
|
|
bjhbhgeiihn.CMOCJKKIDOF = rigidbodyEx;
|
|
Transform targetTransform = this.parentTool.<PBCNKLKCIHJ>k__BackingField._rigidbodyEx.MDKDCJFEBJH;
|
|
PlayerHand <PBCNKLKCIHJ>k__BackingField3 = this.parentTool.<PBCNKLKCIHJ>k__BackingField;
|
|
this.BJHBHGEIIHN.StabilizedRigidbodyOffsetFromPickup.z = targetTransform;
|
|
StabilizedRigidbodyPickup bjhbhgeiihn2 = this.BJHBHGEIIHN;
|
|
Transform transform = bjhbhgeiihn2.transform;
|
|
StabilizedRigidbodyPickup bjhbhgeiihn3 = this.BJHBHGEIIHN;
|
|
Vector3 stabilizerPosition = bjhbhgeiihn2.OCHGHGKKIJK;
|
|
Vector3 vector;
|
|
float z = vector.z;
|
|
bjhbhgeiihn2.StabilizerOffsetPosition.z = z;
|
|
StabilizedRigidbodyPickup bjhbhgeiihn4 = this.BJHBHGEIIHN;
|
|
Vector3 forward = Vector3.forward;
|
|
return;
|
|
}
|
|
Debug.LogError("No HolderHand set in WeaponStabilizationGrip.OnPostPickup");
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06012FB8 RID: 77752 RVA: 0x00456498 File Offset: 0x00454698
|
|
[Token(Token = "0x6012FB8")]
|
|
[Address(RVA = "0x1D41670", Offset = "0x1D40670", VA = "0x181D41670")]
|
|
private void OIOCPLEKMEK(Tool EGFEJGHDNAI)
|
|
{
|
|
StabilizedRigidbodyPickup bjhbhgeiihn = this.BJHBHGEIIHN;
|
|
int num = 0;
|
|
bjhbhgeiihn.CMOCJKKIDOF = num;
|
|
Action action = new Action(base.NNPBKEIEMHL);
|
|
Coroutine coroutine = this.CHAAKFJCLIH(action);
|
|
}
|
|
|
|
// Token: 0x06012FB9 RID: 77753 RVA: 0x004564D0 File Offset: 0x004546D0
|
|
[Token(Token = "0x6012FB9")]
|
|
[Address(RVA = "0x1D415A0", Offset = "0x1D405A0", VA = "0x181D415A0")]
|
|
private void LBODGLNOABB(Tool EGFEJGHDNAI, Vector3 BNMOCBJEEPN, Quaternion LPHCCEOHNIN, Vector3 GMMJHABHDHE, bool ACPOOMGHPKJ)
|
|
{
|
|
object[] array = new object[1];
|
|
if (this != 0)
|
|
{
|
|
}
|
|
array[0] = this;
|
|
Debug.LogErrorFormat("Resetting stabilization subtool {0}. Subtools generally shouldn't be manually reset.", array);
|
|
base.NNPBKEIEMHL();
|
|
}
|
|
|
|
// Token: 0x06012FBA RID: 77754 RVA: 0x00456508 File Offset: 0x00454708
|
|
[Token(Token = "0x6012FBA")]
|
|
[Address(RVA = "0x1D414F0", Offset = "0x1D404F0", VA = "0x181D414F0")]
|
|
private void ILGINDIODEP()
|
|
{
|
|
if (this._tool.FNFNLDBILFE && this._tool.OGIBLNIIHDK)
|
|
{
|
|
Tool tool = this._tool;
|
|
OKIMOMGKKDH ekjclgjfign = OKIMOMGKKDH.EKJCLGJFIGN;
|
|
tool.IKEGONLJBPP = ekjclgjfign;
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06012FBB RID: 77755 RVA: 0x0045654C File Offset: 0x0045474C
|
|
[Token(Token = "0x6012FBB")]
|
|
[Address(RVA = "0x1874B80", Offset = "0x1873B80", VA = "0x181874B80")]
|
|
public WeaponStabilizationGrip()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400C3A3 RID: 50083
|
|
[FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x400C3A3")]
|
|
private StabilizedRigidbodyPickup BJHBHGEIIHN;
|
|
|
|
// Token: 0x0400C3A4 RID: 50084
|
|
[FieldOffset(Offset = "0x70")]
|
|
[Token(Token = "0x400C3A4")]
|
|
private PlungerRigidbodyPickup POICOHHEPON;
|
|
}
|
|
}
|