using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using Mirror;
using MoveClasses;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Gun MOD")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Gun MOD")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ccc4f517-7529-4196-90d3-f01fb329ad04")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace GunMod;
[BepInPlugin("com.yourname.hipweaponlauncher", "Hip Weapon Launcher", "1.3.0")]
public class HipWeaponLauncherMod : BaseUnityPlugin
{
[CompilerGenerated]
private sealed class <WaitForHands>d__1 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public HipWeaponLauncherMod <>4__this;
private Hand[] <hands>5__1;
private Hand[] <>s__2;
private int <>s__3;
private Hand <h>5__4;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <WaitForHands>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<hands>5__1 = null;
<>s__2 = null;
<h>5__4 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
break;
case 1:
<>1__state = -1;
<hands>5__1 = null;
break;
}
<hands>5__1 = Object.FindObjectsOfType<Hand>();
<>s__2 = <hands>5__1;
for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++)
{
<h>5__4 = <>s__2[<>s__3];
if ((Object)(object)((Component)<h>5__4).gameObject.GetComponent<HipWeaponLauncher>() == (Object)null)
{
((Component)<h>5__4).gameObject.AddComponent<HipWeaponLauncher>().hand = <h>5__4;
}
<h>5__4 = null;
}
<>s__2 = null;
<>2__current = (object)new WaitForSeconds(3f);
<>1__state = 1;
return true;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
private void Start()
{
((MonoBehaviour)this).StartCoroutine(WaitForHands());
}
[IteratorStateMachine(typeof(<WaitForHands>d__1))]
private IEnumerator WaitForHands()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <WaitForHands>d__1(0)
{
<>4__this = this
};
}
}
public class HipWeaponLauncher : MonoBehaviour
{
[CompilerGenerated]
private sealed class <AutoLaunchFrontDagger>d__12 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public GameObject dagger;
public HipWeaponLauncher <>4__this;
private Rigidbody <rb>5__1;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <AutoLaunchFrontDagger>d__12(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<rb>5__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = (object)new WaitForSeconds(0.2f);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
if ((Object)(object)dagger == (Object)null)
{
return false;
}
<rb>5__1 = dagger.GetComponent<Rigidbody>();
if ((Object)(object)<rb>5__1 == (Object)null)
{
return false;
}
<rb>5__1.useGravity = true;
<rb>5__1.AddForce(dagger.transform.forward * 50f, (ForceMode)2);
((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.DestroyWeaponAfterSeconds(dagger, 2f));
<>2__current = (object)new WaitForSeconds(0.2f);
<>1__state = 2;
return true;
case 2:
<>1__state = -1;
<>4__this.weaponsSpawned = false;
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <AutoLaunchMace>d__15 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public GameObject mace;
public HipWeaponLauncher <>4__this;
private Rigidbody <rb>5__1;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <AutoLaunchMace>d__15(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<rb>5__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = (object)new WaitForSeconds(0.3f);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
if ((Object)(object)mace == (Object)null)
{
return false;
}
<rb>5__1 = mace.GetComponent<Rigidbody>();
if ((Object)(object)<rb>5__1 == (Object)null)
{
return false;
}
<rb>5__1.useGravity = true;
<rb>5__1.AddForce(mace.transform.forward * 777f, (ForceMode)2);
((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.DestroyWeaponAfterSeconds(mace, 2f));
<>2__current = (object)new WaitForSeconds(0.1f);
<>1__state = 2;
return true;
case 2:
<>1__state = -1;
<>4__this.weaponsSpawned = false;
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <CheckHandStateLoop>d__8 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public HipWeaponLauncher <>4__this;
private PlayerHealth <player>5__1;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <CheckHandStateLoop>d__8(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<player>5__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
//IL_01cb: Expected O, but got Unknown
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
break;
case 1:
<>1__state = -1;
break;
case 2:
<>1__state = -1;
break;
}
if ((Object)(object)<>4__this.hand != (Object)null)
{
<player>5__1 = ((Component)<>4__this.hand).GetComponentInParent<PlayerHealth>();
if ((Object)(object)<player>5__1 == (Object)null || !<player>5__1.alive)
{
<>2__current = (object)new WaitForSeconds(0.2f);
<>1__state = 1;
return true;
}
<>4__this.stateHistory.Add(<>4__this.hand.handState);
if (<>4__this.stateHistory.Count > 6)
{
<>4__this.stateHistory.RemoveAt(0);
}
if (!<>4__this.weaponsSpawned && <>4__this.CheckFrontDaggerPattern(<>4__this.stateHistory))
{
<>4__this.SpawnDaggerInFront();
<>4__this.weaponsSpawned = true;
((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.PatternCooldown());
}
if (!<>4__this.weaponsSpawned && <>4__this.CheckMacePattern(<>4__this.stateHistory))
{
<>4__this.SpawnMaceAfterDelay();
<>4__this.weaponsSpawned = true;
((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.PatternCooldown());
}
<player>5__1 = null;
}
<>2__current = (object)new WaitForSeconds(0.2f);
<>1__state = 2;
return true;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <DestroyWeaponAfterSeconds>d__18 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public GameObject weapon;
public float delay;
public HipWeaponLauncher <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <DestroyWeaponAfterSeconds>d__18(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = (object)new WaitForSeconds(delay);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
if ((Object)(object)weapon != (Object)null && NetworkServer.active)
{
NetworkServer.Destroy(weapon);
}
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <PatternCooldown>d__6 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public HipWeaponLauncher <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <PatternCooldown>d__6(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>4__this.isPatternOnCooldown = true;
<>2__current = (object)new WaitForSeconds(1f);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<>4__this.isPatternOnCooldown = false;
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <SpawnMaceCoroutine>d__14 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public HipWeaponLauncher <>4__this;
private GameObject <prefab>5__1;
private Vector3 <spawnPos>5__2;
private GameObject <mace>5__3;
private Rigidbody <rb>5__4;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <SpawnMaceCoroutine>d__14(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<prefab>5__1 = null;
<mace>5__3 = null;
<rb>5__4 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
//IL_0081: 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_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: 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_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_00db: Unknown result type (might be due to invalid IL or missing references)
//IL_012c: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = (object)new WaitForSeconds(1.5f);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<prefab>5__1 = <>4__this.FindWeaponPrefab("mace");
if ((Object)(object)<prefab>5__1 == (Object)null || !NetworkServer.active)
{
return false;
}
<spawnPos>5__2 = <>4__this.hipTransform.position + <>4__this.hipTransform.forward * 2.1f + Vector3.up * 0.4f;
<mace>5__3 = Object.Instantiate<GameObject>(<prefab>5__1, <spawnPos>5__2, Quaternion.LookRotation(<>4__this.hipTransform.forward));
<rb>5__4 = <mace>5__3.GetComponent<Rigidbody>();
if ((Object)(object)<rb>5__4 != (Object)null)
{
<rb>5__4.useGravity = false;
<rb>5__4.isKinematic = false;
<rb>5__4.velocity = Vector3.zero;
}
<>4__this.spawnedWeapons.Add(<mace>5__3);
NetworkServer.Spawn(<mace>5__3, (NetworkConnection)null);
((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.AutoLaunchMace(<mace>5__3));
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
public Hand hand;
private Transform hipTransform;
private List<GameObject> spawnedWeapons = new List<GameObject>();
private List<HandState> stateHistory = new List<HandState>();
private bool weaponsSpawned = false;
private bool isPatternOnCooldown = false;
[IteratorStateMachine(typeof(<PatternCooldown>d__6))]
private IEnumerator PatternCooldown()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <PatternCooldown>d__6(0)
{
<>4__this = this
};
}
private void Start()
{
((MonoBehaviour)this).StartCoroutine(CheckHandStateLoop());
}
[IteratorStateMachine(typeof(<CheckHandStateLoop>d__8))]
private IEnumerator CheckHandStateLoop()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <CheckHandStateLoop>d__8(0)
{
<>4__this = this
};
}
private bool CheckFrontDaggerPattern(List<HandState> history)
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Invalid comparison between Unknown and I4
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Invalid comparison between Unknown and I4
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Invalid comparison between Unknown and I4
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: 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
if (history.Count < 6)
{
return false;
}
return (int)history[0] == 2 && (int)history[1] == 2 && (int)history[2] == 1 && (int)history[3] == 2 && (int)history[4] == 1 && (int)history[5] == 0;
}
private bool CheckMacePattern(List<HandState> history)
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Invalid comparison between Unknown and I4
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Invalid comparison between Unknown and I4
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Invalid comparison between Unknown and I4
//IL_003b: 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_004a: Invalid comparison between Unknown and I4
if (history.Count < 6)
{
return false;
}
return (int)history[0] == 1 && (int)history[1] == 1 && (int)history[2] == 0 && (int)history[3] == 2 && (int)history[4] == 0 && (int)history[5] == 1;
}
private void SpawnDaggerInFront()
{
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
PlayerHealth componentInParent = ((Component)hand).GetComponentInParent<PlayerHealth>();
if ((Object)(object)componentInParent == (Object)null)
{
return;
}
hipTransform = FindHipTransform(((Component)componentInParent).transform);
if ((Object)(object)hipTransform == (Object)null)
{
hipTransform = ((Component)componentInParent).transform;
}
spawnedWeapons.Clear();
GameObject val = FindWeaponPrefab("dagger");
if (!((Object)(object)val == (Object)null) && NetworkServer.active)
{
Vector3 val2 = hipTransform.position + hipTransform.forward * 0.9f + Vector3.up * 0.4f;
GameObject val3 = Object.Instantiate<GameObject>(val, val2, Quaternion.LookRotation(hipTransform.forward));
Rigidbody component = val3.GetComponent<Rigidbody>();
if ((Object)(object)component != (Object)null)
{
component.useGravity = false;
component.isKinematic = false;
component.velocity = Vector3.zero;
}
spawnedWeapons.Add(val3);
NetworkServer.Spawn(val3, (NetworkConnection)null);
((MonoBehaviour)this).StartCoroutine(AutoLaunchFrontDagger(val3));
}
}
[IteratorStateMachine(typeof(<AutoLaunchFrontDagger>d__12))]
private IEnumerator AutoLaunchFrontDagger(GameObject dagger)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <AutoLaunchFrontDagger>d__12(0)
{
<>4__this = this,
dagger = dagger
};
}
private void SpawnMaceAfterDelay()
{
PlayerHealth componentInParent = ((Component)hand).GetComponentInParent<PlayerHealth>();
if (!((Object)(object)componentInParent == (Object)null))
{
hipTransform = FindHipTransform(((Component)componentInParent).transform);
if ((Object)(object)hipTransform == (Object)null)
{
hipTransform = ((Component)componentInParent).transform;
}
((MonoBehaviour)this).StartCoroutine(SpawnMaceCoroutine());
}
}
[IteratorStateMachine(typeof(<SpawnMaceCoroutine>d__14))]
private IEnumerator SpawnMaceCoroutine()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <SpawnMaceCoroutine>d__14(0)
{
<>4__this = this
};
}
[IteratorStateMachine(typeof(<AutoLaunchMace>d__15))]
private IEnumerator AutoLaunchMace(GameObject mace)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <AutoLaunchMace>d__15(0)
{
<>4__this = this,
mace = mace
};
}
private Transform FindHipTransform(Transform root)
{
Transform[] componentsInChildren = ((Component)root).GetComponentsInChildren<Transform>();
foreach (Transform val in componentsInChildren)
{
if (((Object)val).name.Contains("PlayerCharacter") && (Object)(object)val.Find("PlayerModelPhysics/HIP") != (Object)null)
{
return val.Find("PlayerModelPhysics/HIP");
}
}
return null;
}
private GameObject FindWeaponPrefab(string namePart)
{
Rigidbody[] array = Resources.FindObjectsOfTypeAll<Rigidbody>();
Rigidbody[] array2 = array;
foreach (Rigidbody val in array2)
{
string text = ((Object)((Component)val).gameObject).name.ToLower();
if (text.Contains(namePart) && ((Component)val).gameObject.layer == LayerMask.NameToLayer("Weapons") && (Object)(object)((Component)val).GetComponent<Weapon>() != (Object)null && !text.Contains("(clone)"))
{
return ((Component)val).gameObject;
}
}
return null;
}
[IteratorStateMachine(typeof(<DestroyWeaponAfterSeconds>d__18))]
private IEnumerator DestroyWeaponAfterSeconds(GameObject weapon, float delay)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <DestroyWeaponAfterSeconds>d__18(0)
{
<>4__this = this,
weapon = weapon,
delay = delay
};
}
}