#define DEBUG
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Cryptography;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using CharlottesLabyrinth;
using CodeRebirth.src.MiscScripts;
using CodeRebirthLib;
using CodeRebirthLib.AssetManagement;
using CodeRebirthLib.ContentManagement;
using CodeRebirthLib.Extensions;
using ExampleEnemy;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using com.github.Teaisnt.CharlottesLabyrinth.NetcodePatcher;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("com.github.Teaisnt.CharlottesLabyrinth")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.4.0")]
[assembly: AssemblyInformationalVersion("1.0.4")]
[assembly: AssemblyProduct("com.github.Teaisnt.CharlottesLabyrinth")]
[assembly: AssemblyTitle("CharlottesLabyrinth")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.4.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: NetcodePatchedAssembly]
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;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.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 class KyokosSpear : GrabbableObject
{
public int shovelHitForce = 1;
public bool attacking;
public bool isHoldingButton;
private RaycastHit rayHit;
private Coroutine reelingUpCoroutine;
private RaycastHit[] objectsHitByShovel;
private List<RaycastHit> objectsHitByShovelList = new List<RaycastHit>();
public AudioClip reelUp;
public AudioClip swing;
public AudioClip[] hitSFX;
public AudioSource shovelAudio;
private PlayerControllerB previousPlayerHeldBy;
public Animator spearAnimator;
private int shovelMask = 1084754248;
public override void ItemActivate(bool used, bool buttonDown = true)
{
if ((Object)(object)base.playerHeldBy == (Object)null)
{
return;
}
isHoldingButton = buttonDown;
if (!attacking && buttonDown)
{
attacking = true;
previousPlayerHeldBy = base.playerHeldBy;
if (reelingUpCoroutine != null)
{
((MonoBehaviour)this).StopCoroutine(reelingUpCoroutine);
}
reelingUpCoroutine = ((MonoBehaviour)this).StartCoroutine(reelUpShovel());
}
}
private IEnumerator reelUpShovel()
{
spearAnimator.SetTrigger("AttackNormal");
base.playerHeldBy.playerBodyAnimator.SetBool("crouching", false);
base.playerHeldBy.playerBodyAnimator.SetTrigger("SwitchHoldAnimationTwoHanded");
base.playerHeldBy.playerBodyAnimator.SetBool("HoldPatcherTool", true);
base.playerHeldBy.playerBodyAnimator.SetBool("PullingCameraRight", true);
base.playerHeldBy.activatingItem = true;
base.playerHeldBy.twoHanded = true;
base.playerHeldBy.playerBodyAnimator.SetBool("HoldPatcherTool", false);
base.playerHeldBy.playerBodyAnimator.SetBool("PullingCameraRight", false);
SwingShovel(!base.isHeld);
yield return (object)new WaitForSeconds(0.5f);
yield return (object)new WaitForEndOfFrame();
HitShovel(!base.isHeld);
yield return (object)new WaitForSeconds(0.5f);
attacking = false;
reelingUpCoroutine = null;
}
[ServerRpc]
public void ReelUpSFXServerRpc()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Invalid comparison between Unknown and I4
//IL_0107: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Invalid comparison between Unknown and I4
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
{
if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
{
if ((int)networkManager.LogLevel <= 1)
{
Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
}
return;
}
ServerRpcParams val = default(ServerRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3167099932u, val, (RpcDelivery)0);
((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3167099932u, val, (RpcDelivery)0);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
ReelUpSFXClientRpc();
}
}
[ClientRpc]
public void ReelUpSFXClientRpc()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: 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)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(162187550u, val, (RpcDelivery)0);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 162187550u, val, (RpcDelivery)0);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
if (!((NetworkBehaviour)this).IsOwner)
{
shovelAudio.PlayOneShot(reelUp);
}
}
}
public override void DiscardItem()
{
if ((Object)(object)base.playerHeldBy != (Object)null)
{
base.playerHeldBy.activatingItem = false;
}
((GrabbableObject)this).DiscardItem();
}
public void SwingShovel(bool cancel = false)
{
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
if (!cancel)
{
shovelAudio.PlayOneShot(swing);
previousPlayerHeldBy.UpdateSpecialAnimationValue(true, (short)((Component)previousPlayerHeldBy).transform.localEulerAngles.y, 0.4f, false);
}
}
public void HitShovel(bool cancel = false)
{
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: 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_0430: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_010e: 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)
//IL_0131: Unknown result type (might be due to invalid IL or missing references)
//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
//IL_01fc: 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_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_0219: Unknown result type (might be due to invalid IL or missing references)
//IL_021e: Unknown result type (might be due to invalid IL or missing references)
//IL_0186: Unknown result type (might be due to invalid IL or missing references)
//IL_018b: Unknown result type (might be due to invalid IL or missing references)
//IL_0241: Unknown result type (might be due to invalid IL or missing references)
//IL_0246: Unknown result type (might be due to invalid IL or missing references)
//IL_024a: 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_02bc: 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_026b: Unknown result type (might be due to invalid IL or missing references)
//IL_0278: Unknown result type (might be due to invalid IL or missing references)
//IL_027d: Unknown result type (might be due to invalid IL or missing references)
//IL_0281: 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_02d1: Unknown result type (might be due to invalid IL or missing references)
//IL_0329: Unknown result type (might be due to invalid IL or missing references)
//IL_032e: Unknown result type (might be due to invalid IL or missing references)
//IL_0368: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)previousPlayerHeldBy == (Object)null)
{
Debug.LogError((object)"Previousplayerheldby is null on this client when HitShovel is called.");
return;
}
previousPlayerHeldBy.activatingItem = false;
bool flag = false;
bool flag2 = false;
bool flag3 = false;
int num = -1;
if (!cancel)
{
previousPlayerHeldBy.twoHanded = false;
objectsHitByShovel = Physics.SphereCastAll(((Component)previousPlayerHeldBy.gameplayCamera).transform.position + ((Component)previousPlayerHeldBy.gameplayCamera).transform.right * -0.35f, 0.8f, ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward, 1.5f, shovelMask, (QueryTriggerInteraction)2);
objectsHitByShovelList = objectsHitByShovel.OrderBy((RaycastHit x) => ((RaycastHit)(ref x)).distance).ToList();
List<EnemyAI> list = new List<EnemyAI>();
IHittable val2 = default(IHittable);
for (int i = 0; i < objectsHitByShovelList.Count; i++)
{
RaycastHit val = objectsHitByShovelList[i];
if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 8)
{
val = objectsHitByShovelList[i];
if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 11)
{
val = objectsHitByShovelList[i];
if (!((Component)((RaycastHit)(ref val)).transform).TryGetComponent<IHittable>(ref val2))
{
continue;
}
val = objectsHitByShovelList[i];
if ((Object)(object)((RaycastHit)(ref val)).transform == (Object)(object)((Component)previousPlayerHeldBy).transform)
{
continue;
}
val = objectsHitByShovelList[i];
if (!(((RaycastHit)(ref val)).point == Vector3.zero))
{
Vector3 position = ((Component)previousPlayerHeldBy.gameplayCamera).transform.position;
RaycastHit val3 = objectsHitByShovelList[i];
if (Physics.Linecast(position, ((RaycastHit)(ref val3)).point, ref val, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1))
{
continue;
}
}
flag = true;
Vector3 forward = ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward;
try
{
val = objectsHitByShovelList[i];
EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val)).transform).GetComponent<EnemyAICollisionDetect>();
if ((Object)(object)component != (Object)null)
{
if (!((Object)(object)component.mainScript == (Object)null) && !list.Contains(component.mainScript))
{
goto IL_035f;
}
continue;
}
val = objectsHitByShovelList[i];
if (!((Object)(object)((Component)((RaycastHit)(ref val)).transform).GetComponent<PlayerControllerB>() != (Object)null))
{
goto IL_035f;
}
if (!flag3)
{
flag3 = true;
goto IL_035f;
}
goto end_IL_02c3;
IL_035f:
bool flag4 = val2.Hit(shovelHitForce, forward, previousPlayerHeldBy, true, 1);
if (flag4 && (Object)(object)component != (Object)null)
{
list.Add(component.mainScript);
}
if (!flag2)
{
flag2 = flag4;
}
end_IL_02c3:;
}
catch (Exception arg)
{
Debug.Log((object)$"Exception caught when hitting object with shovel from player #{previousPlayerHeldBy.playerClientId}: {arg}");
}
continue;
}
}
val = objectsHitByShovelList[i];
if (((RaycastHit)(ref val)).collider.isTrigger)
{
continue;
}
flag = true;
val = objectsHitByShovelList[i];
string tag = ((Component)((RaycastHit)(ref val)).collider).gameObject.tag;
for (int j = 0; j < StartOfRound.Instance.footstepSurfaces.Length; j++)
{
if (StartOfRound.Instance.footstepSurfaces[j].surfaceTag == tag)
{
num = j;
break;
}
}
}
}
if (flag)
{
RoundManager.PlayRandomClip(shovelAudio, hitSFX, true, 1f, 0, 1000);
Object.FindObjectOfType<RoundManager>().PlayAudibleNoise(((Component)this).transform.position, 17f, 0.8f, 0, false, 0);
if (!flag2 && num != -1)
{
shovelAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[num].hitSurfaceSFX);
WalkieTalkie.TransmitOneShotAudio(shovelAudio, StartOfRound.Instance.footstepSurfaces[num].hitSurfaceSFX, 1f);
}
HitShovelServerRpc(num);
}
}
[ServerRpc]
public void HitShovelServerRpc(int hitSurfaceID)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Invalid comparison between Unknown and I4
//IL_0114: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Invalid comparison between Unknown and I4
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
{
if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
{
if ((int)networkManager.LogLevel <= 1)
{
Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
}
return;
}
ServerRpcParams val = default(ServerRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(641634948u, val, (RpcDelivery)0);
BytePacker.WriteValueBitPacked(val2, hitSurfaceID);
((NetworkBehaviour)this).__endSendServerRpc(ref val2, 641634948u, val, (RpcDelivery)0);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
HitShovelClientRpc(hitSurfaceID);
}
}
[ClientRpc]
public void HitShovelClientRpc(int hitSurfaceID)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2942675955u, val, (RpcDelivery)0);
BytePacker.WriteValueBitPacked(val2, hitSurfaceID);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2942675955u, val, (RpcDelivery)0);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost))
{
return;
}
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
if (!((NetworkBehaviour)this).IsOwner)
{
RoundManager.PlayRandomClip(shovelAudio, hitSFX, true, 1f, 0, 1000);
if (hitSurfaceID != -1)
{
HitSurfaceWithShovel(hitSurfaceID);
}
}
}
private void HitSurfaceWithShovel(int hitSurfaceID)
{
shovelAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[hitSurfaceID].hitSurfaceSFX);
WalkieTalkie.TransmitOneShotAudio(shovelAudio, StartOfRound.Instance.footstepSurfaces[hitSurfaceID].hitSurfaceSFX, 1f);
}
protected override void __initializeVariables()
{
((GrabbableObject)this).__initializeVariables();
}
protected override void __initializeRpcs()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Expected O, but got Unknown
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Expected O, but got Unknown
((NetworkBehaviour)this).__registerRpc(3167099932u, new RpcReceiveHandler(__rpc_handler_3167099932), "ReelUpSFXServerRpc");
((NetworkBehaviour)this).__registerRpc(162187550u, new RpcReceiveHandler(__rpc_handler_162187550), "ReelUpSFXClientRpc");
((NetworkBehaviour)this).__registerRpc(641634948u, new RpcReceiveHandler(__rpc_handler_641634948), "HitShovelServerRpc");
((NetworkBehaviour)this).__registerRpc(2942675955u, new RpcReceiveHandler(__rpc_handler_2942675955), "HitShovelClientRpc");
((GrabbableObject)this).__initializeRpcs();
}
private static void __rpc_handler_3167099932(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0023: 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_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: 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_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Invalid comparison between Unknown and I4
NetworkManager networkManager = target.NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId)
{
if ((int)networkManager.LogLevel <= 1)
{
Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
}
}
else
{
target.__rpc_exec_stage = (__RpcExecStage)1;
((KyokosSpear)(object)target).ReelUpSFXServerRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_162187550(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0029: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
target.__rpc_exec_stage = (__RpcExecStage)1;
((KyokosSpear)(object)target).ReelUpSFXClientRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_641634948(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0023: 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_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Invalid comparison between Unknown and I4
NetworkManager networkManager = target.NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId)
{
if ((int)networkManager.LogLevel <= 1)
{
Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
}
}
else
{
int hitSurfaceID = default(int);
ByteUnpacker.ReadValueBitPacked(reader, ref hitSurfaceID);
target.__rpc_exec_stage = (__RpcExecStage)1;
((KyokosSpear)(object)target).HitShovelServerRpc(hitSurfaceID);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_2942675955(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
int hitSurfaceID = default(int);
ByteUnpacker.ReadValueBitPacked(reader, ref hitSurfaceID);
target.__rpc_exec_stage = (__RpcExecStage)1;
((KyokosSpear)(object)target).HitShovelClientRpc(hitSurfaceID);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
protected internal override string __getTypeName()
{
return "KyokosSpear";
}
}
public class LabyrinthController : NetworkBehaviour
{
public List<GameObject> objectsToEnableWhenCollapse = new List<GameObject>();
public List<EnableWhenCollapse> labyrinthLights = new List<EnableWhenCollapse>();
public List<Volume> labyrinthVolumes = new List<Volume>();
public Transform qbSpawnPosition;
public EnemyType qbEnemyType;
public bool hasDisabledCollapseObjects = false;
public bool isCollapsing = false;
public VolumeProfile collapsingProfile;
private PlayerControllerB player;
[SerializeField]
private AudioSource musicSource1;
[SerializeField]
private AudioSource musicSource2;
[SerializeField]
private AudioClip interiorCollapsingSong;
[SerializeField]
private AudioClip moonCollapsingSong;
[SerializeField]
private float fadeSourceSpeed;
[SerializeField]
private float songMaxVolume;
private bool isPlayingSong1;
private Coroutine fadeSourceCoroutine;
private RoundManager roundManager;
public static LabyrinthController Instance { get; private set; }
private void Awake()
{
Instance = this;
}
private void Start()
{
//IL_0021: 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)
roundManager = Object.FindObjectOfType<RoundManager>();
if (((NetworkBehaviour)this).IsOwner)
{
RoundManager.Instance.SpawnEnemyGameObject(qbSpawnPosition.position, 0f, 1, qbEnemyType);
}
player = GameNetworkManager.Instance.localPlayerController;
if (!Plugin.MusicEnabled.Value)
{
musicSource1.Stop();
musicSource2.Stop();
}
musicSource1.volume = Plugin.MusicMaxVolume.Value;
musicSource2.volume = Plugin.MusicMaxVolume.Value;
}
private void Update()
{
if (isCollapsing && Plugin.MusicEnabled.Value)
{
CheckIfStopSource();
}
}
private void CheckIfStopSource()
{
if (player.isPlayerDead && (Object)(object)player.spectatedPlayerScript != (Object)null)
{
if (player.spectatedPlayerScript.isInsideFactory && !isPlayingSong1)
{
ChangeSong(interiorCollapsingSong);
}
else if (!player.spectatedPlayerScript.isInsideFactory && isPlayingSong1)
{
ChangeSong(moonCollapsingSong);
}
}
else if (player.isInsideFactory && !isPlayingSong1)
{
ChangeSong(interiorCollapsingSong);
}
else if (!player.isInsideFactory && isPlayingSong1)
{
ChangeSong(moonCollapsingSong);
}
}
[ServerRpc(RequireOwnership = false)]
public void StartCollapseLabyrinthServerRpc()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: 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)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
{
ServerRpcParams val = default(ServerRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2608226864u, val, (RpcDelivery)0);
((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2608226864u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
{
base.__rpc_exec_stage = (__RpcExecStage)0;
StartCollapseLabyrinthClientRpc();
}
}
}
[ClientRpc]
public void StartCollapseLabyrinthClientRpc()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: 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)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1442127350u, val, (RpcDelivery)0);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1442127350u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
base.__rpc_exec_stage = (__RpcExecStage)0;
if (!isCollapsing)
{
((MonoBehaviour)this).StartCoroutine(LabyrinthCollapseCoroutine());
}
}
}
private IEnumerator LabyrinthCollapseCoroutine()
{
if (((NetworkBehaviour)this).IsServer && Random.Range(0, 100) < 70 && RoundManager.Instance.minEnemiesToSpawn < 2)
{
RoundManager.Instance.minEnemiesToSpawn = 2;
}
yield return (object)new WaitForSeconds(1f);
if (((NetworkBehaviour)this).IsServer)
{
roundManager.FlickerLights(false, false);
}
yield return (object)new WaitForSeconds(0.5f);
foreach (GameObject item in objectsToEnableWhenCollapse)
{
item.SetActive(true);
}
yield return (object)new WaitForSeconds(1f);
if (((NetworkBehaviour)this).IsServer)
{
roundManager.SwitchPower(false);
}
yield return (object)new WaitForSeconds(1f);
HUDManager.Instance.RadiationWarningHUD();
isCollapsing = true;
if (Plugin.MusicEnabled.Value)
{
if (player.isInsideFactory)
{
ChangeSong(interiorCollapsingSong);
}
else if (!player.isInsideFactory)
{
ChangeSong(moonCollapsingSong);
}
}
if (((NetworkBehaviour)this).IsServer)
{
roundManager.SwitchPower(true);
}
yield return (object)new WaitForSeconds(0.5f);
foreach (EnableWhenCollapse light in labyrinthLights)
{
light.LightGoBrrrr();
}
foreach (Volume volume in labyrinthVolumes)
{
volume.profile = collapsingProfile;
}
}
public void ChangeSong(AudioClip newSong)
{
if (fadeSourceCoroutine != null)
{
((MonoBehaviour)this).StopCoroutine(fadeSourceCoroutine);
}
fadeSourceCoroutine = ((MonoBehaviour)this).StartCoroutine(FadeSource(newSong, 0f));
isPlayingSong1 = !isPlayingSong1;
}
private IEnumerator FadeSource(AudioClip newSong, float delayBeforeSwitching)
{
float timeToFade = fadeSourceSpeed + delayBeforeSwitching;
float timeElapsed = 0f;
if (isPlayingSong1)
{
musicSource2.clip = newSong;
musicSource2.Play();
while (timeElapsed < timeToFade)
{
musicSource2.volume = Mathf.Lerp(0f, Plugin.MusicMaxVolume.Value, timeElapsed / timeToFade);
musicSource1.volume = Mathf.Lerp(Plugin.MusicMaxVolume.Value, 0f, timeElapsed / timeToFade);
timeElapsed += Time.deltaTime;
yield return null;
}
musicSource2.volume = Plugin.MusicMaxVolume.Value;
musicSource1.volume = 0f;
}
else
{
musicSource1.clip = newSong;
musicSource1.Play();
while (timeElapsed < timeToFade)
{
musicSource2.volume = Mathf.Lerp(Plugin.MusicMaxVolume.Value, 0f, timeElapsed / timeToFade);
musicSource1.volume = Mathf.Lerp(0f, Plugin.MusicMaxVolume.Value, timeElapsed / timeToFade);
timeElapsed += Time.deltaTime;
yield return null;
}
musicSource2.volume = 0f;
musicSource1.volume = Plugin.MusicMaxVolume.Value;
}
}
protected override void __initializeVariables()
{
((NetworkBehaviour)this).__initializeVariables();
}
protected override void __initializeRpcs()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Expected O, but got Unknown
((NetworkBehaviour)this).__registerRpc(2608226864u, new RpcReceiveHandler(__rpc_handler_2608226864), "StartCollapseLabyrinthServerRpc");
((NetworkBehaviour)this).__registerRpc(1442127350u, new RpcReceiveHandler(__rpc_handler_1442127350), "StartCollapseLabyrinthClientRpc");
((NetworkBehaviour)this).__initializeRpcs();
}
private static void __rpc_handler_2608226864(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0029: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
target.__rpc_exec_stage = (__RpcExecStage)1;
((LabyrinthController)(object)target).StartCollapseLabyrinthServerRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_1442127350(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0029: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
target.__rpc_exec_stage = (__RpcExecStage)1;
((LabyrinthController)(object)target).StartCollapseLabyrinthClientRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
protected internal override string __getTypeName()
{
return "LabyrinthController";
}
}
public class MoveBackAndForth : MonoBehaviour
{
[SerializeField]
private Vector3 frequency;
[SerializeField]
private Vector3 magnitude;
[SerializeField]
private Vector3 offset;
private void Update()
{
//IL_009e: 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)
float num = Mathf.Sin(Time.time * frequency.x + offset.x) * magnitude.x;
float num2 = Mathf.Sin(Time.time * frequency.y + offset.y) * magnitude.y;
float num3 = Mathf.Sin(Time.time * frequency.z + offset.z) * magnitude.z;
Vector3 val = default(Vector3);
((Vector3)(ref val))..ctor(num, num2, num3);
((Component)this).transform.Translate(val * Time.deltaTime);
}
}
public class QBHittable : MonoBehaviour, IHittable
{
public QBController qbController;
bool IHittable.Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit, bool playHitSFX, int hitID = -1)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
qbController.HitFromTurret(hitDirection);
return true;
}
}
public class QBPhysicsProp : GrabbableObject
{
public Animator animator = null;
public QBController qbController = null;
public PlayerControllerB? previousPlayerHeldBy = null;
[HideInInspector]
public static readonly int RunSpeedFloat = Animator.StringToHash("RunSpeed");
public override void EquipItem()
{
((GrabbableObject)this).EquipItem();
qbController.PickUpQBLocalClient();
previousPlayerHeldBy = base.playerHeldBy;
}
public override void FallWithCurve()
{
if (((EnemyAI)qbController).inSpecialAnimation)
{
((GrabbableObject)this).FallWithCurve();
}
}
public override void Start()
{
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_0117: Unknown result type (might be due to invalid IL or missing references)
//IL_011c: 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_00e5: 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_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: 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)
base.propColliders = ((Component)this).gameObject.GetComponentsInChildren<Collider>();
for (int i = 0; i < base.propColliders.Length; i++)
{
if (!((Component)base.propColliders[i]).CompareTag("DoNotSet") && !((Component)base.propColliders[i]).CompareTag("Enemy"))
{
base.propColliders[i].excludeLayers = LayerMask.op_Implicit(-2621449);
}
}
base.originalScale = ((Component)this).transform.localScale;
if (base.itemProperties.itemSpawnsOnGround)
{
base.startFallingPosition = ((Component)this).transform.position;
if ((Object)(object)((Component)this).transform.parent != (Object)null)
{
base.startFallingPosition = ((Component)this).transform.parent.InverseTransformPoint(base.startFallingPosition);
}
((GrabbableObject)this).FallToGround(false, false, default(Vector3));
}
else
{
base.fallTime = 1f;
base.hasHitGround = true;
base.reachedFloorTarget = true;
base.targetFloorPosition = ((Component)this).transform.localPosition;
}
if (base.itemProperties.isScrap)
{
base.fallTime = 1f;
base.hasHitGround = true;
}
if (base.itemProperties.isScrap && (Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null)
{
base.radarIcon = Object.Instantiate<GameObject>(StartOfRound.Instance.itemRadarIconPrefab, RoundManager.Instance.mapPropsContainer.transform).transform;
}
if (!base.itemProperties.isScrap)
{
HoarderBugAI.grabbableObjectsInMap.Add(((Component)this).gameObject);
}
MeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<MeshRenderer>();
for (int j = 0; j < componentsInChildren.Length; j++)
{
((Renderer)componentsInChildren[j]).renderingLayerMask = 1u;
}
SkinnedMeshRenderer[] componentsInChildren2 = ((Component)this).gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
for (int k = 0; k < componentsInChildren2.Length; k++)
{
((Renderer)componentsInChildren2[k]).renderingLayerMask = 1u;
}
}
public override void Update()
{
//IL_0022: 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_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
//IL_015f: 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)
if (((NetworkBehaviour)this).IsOwner)
{
Animator obj = animator;
int runSpeedFloat = RunSpeedFloat;
Vector3 velocity = ((EnemyAI)qbController).agent.velocity;
obj.SetFloat(runSpeedFloat, ((Vector3)(ref velocity)).magnitude / 3f);
if (!base.wasOwnerLastFrame)
{
base.wasOwnerLastFrame = true;
}
}
else if (base.wasOwnerLastFrame)
{
base.wasOwnerLastFrame = false;
}
if (!base.isHeld && (Object)(object)base.parentObject == (Object)null)
{
if (base.fallTime < 1f)
{
base.reachedFloorTarget = false;
((GrabbableObject)this).FallWithCurve();
if (((Component)this).transform.localPosition.y - base.targetFloorPosition.y < 0.05f && !base.hasHitGround)
{
((GrabbableObject)this).PlayDropSFX();
((GrabbableObject)this).OnHitGround();
}
return;
}
if (!base.reachedFloorTarget)
{
if (!base.hasHitGround)
{
((GrabbableObject)this).PlayDropSFX();
((GrabbableObject)this).OnHitGround();
}
base.reachedFloorTarget = true;
if (base.floorYRot == -1)
{
((Component)this).transform.rotation = Quaternion.Euler(base.itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, base.itemProperties.restingRotation.z);
}
else
{
((Component)this).transform.rotation = Quaternion.Euler(base.itemProperties.restingRotation.x, (float)(base.floorYRot + base.itemProperties.floorYOffset) + 90f, base.itemProperties.restingRotation.z);
}
}
if (((EnemyAI)qbController).inSpecialAnimation)
{
((Component)this).transform.localPosition = base.targetFloorPosition;
}
}
else if (base.isHeld || base.isHeldByEnemy)
{
base.reachedFloorTarget = false;
}
}
public override void LateUpdate()
{
//IL_002e: 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_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: 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_008c: 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_0092: Unknown result type (might be due to invalid IL or missing references)
if (((EnemyAI)qbController).inSpecialAnimation && (Object)(object)base.parentObject != (Object)null)
{
((Component)this).transform.rotation = base.parentObject.rotation;
((Component)this).transform.Rotate(base.itemProperties.rotationOffset);
((Component)this).transform.position = base.parentObject.position;
Vector3 positionOffset = base.itemProperties.positionOffset;
positionOffset = base.parentObject.rotation * positionOffset;
Transform transform = ((Component)this).transform;
transform.position += positionOffset;
}
}
public override void EnableItemMeshes(bool enable)
{
MeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<MeshRenderer>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
if (!((Component)componentsInChildren[i]).gameObject.CompareTag("DoNotSet") && !((Component)componentsInChildren[i]).gameObject.CompareTag("InteractTrigger") && !((Component)componentsInChildren[i]).gameObject.CompareTag("Enemy"))
{
((Renderer)componentsInChildren[i]).enabled = enable;
}
}
SkinnedMeshRenderer[] componentsInChildren2 = ((Component)this).gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
for (int j = 0; j < componentsInChildren2.Length; j++)
{
((Renderer)componentsInChildren2[j]).enabled = enable;
}
}
public override void DiscardItem()
{
qbController.DropQbLocalClient();
DropBabyServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId);
previousPlayerHeldBy = base.playerHeldBy;
((GrabbableObject)this).DiscardItem();
}
[ServerRpc(RequireOwnership = false)]
public void DropBabyServerRpc(int playerClientId)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
{
ServerRpcParams val = default(ServerRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2989652338u, val, (RpcDelivery)0);
BytePacker.WriteValueBitPacked(val2, playerClientId);
((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2989652338u, val, (RpcDelivery)0);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
animator.SetTrigger("drop");
DropBabyClientRpc(playerClientId);
}
}
}
[ClientRpc]
public void DropBabyClientRpc(int playerClientId)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2941154200u, val, (RpcDelivery)0);
BytePacker.WriteValueBitPacked(val2, playerClientId);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2941154200u, val, (RpcDelivery)0);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
if (playerClientId != (int)GameNetworkManager.Instance.localPlayerController.playerClientId)
{
qbController.DropQbLocalClient();
}
}
}
protected override void __initializeVariables()
{
((GrabbableObject)this).__initializeVariables();
}
protected override void __initializeRpcs()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Expected O, but got Unknown
((NetworkBehaviour)this).__registerRpc(2989652338u, new RpcReceiveHandler(__rpc_handler_2989652338), "DropBabyServerRpc");
((NetworkBehaviour)this).__registerRpc(2941154200u, new RpcReceiveHandler(__rpc_handler_2941154200), "DropBabyClientRpc");
((GrabbableObject)this).__initializeRpcs();
}
private static void __rpc_handler_2989652338(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
int playerClientId = default(int);
ByteUnpacker.ReadValueBitPacked(reader, ref playerClientId);
target.__rpc_exec_stage = (__RpcExecStage)1;
((QBPhysicsProp)(object)target).DropBabyServerRpc(playerClientId);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_2941154200(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
int playerClientId = default(int);
ByteUnpacker.ReadValueBitPacked(reader, ref playerClientId);
target.__rpc_exec_stage = (__RpcExecStage)1;
((QBPhysicsProp)(object)target).DropBabyClientRpc(playerClientId);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
protected internal override string __getTypeName()
{
return "QBPhysicsProp";
}
}
public class QBSpikeTrapDetect : NetworkBehaviour
{
public QBController qbController;
private Transform spikeRoofTrapCurrTransform;
public void OnTriggerEnter(Collider other)
{
SpikeRoofTrap val = default(SpikeRoofTrap);
if (((Component)other).TryGetComponent<SpikeRoofTrap>(ref val))
{
spikeRoofTrapCurrTransform = ((Component)val.stickingPointsContainer).transform;
AddStickPointServerRpc();
qbController.SpikeTrapDeathServerRpc();
}
}
[ServerRpc]
public void AddStickPointServerRpc()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Invalid comparison between Unknown and I4
//IL_0107: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Invalid comparison between Unknown and I4
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
{
if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
{
if ((int)networkManager.LogLevel <= 1)
{
Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
}
return;
}
ServerRpcParams val = default(ServerRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1251977406u, val, (RpcDelivery)0);
((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1251977406u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
{
base.__rpc_exec_stage = (__RpcExecStage)0;
AddStickPointClientRpc();
}
}
[ClientRpc]
public void AddStickPointClientRpc()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: 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)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4036922901u, val, (RpcDelivery)0);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4036922901u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
base.__rpc_exec_stage = (__RpcExecStage)0;
qbController.qbRagdollAttachPoints.Add(spikeRoofTrapCurrTransform);
}
}
}
protected override void __initializeVariables()
{
((NetworkBehaviour)this).__initializeVariables();
}
protected override void __initializeRpcs()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Expected O, but got Unknown
((NetworkBehaviour)this).__registerRpc(1251977406u, new RpcReceiveHandler(__rpc_handler_1251977406), "AddStickPointServerRpc");
((NetworkBehaviour)this).__registerRpc(4036922901u, new RpcReceiveHandler(__rpc_handler_4036922901), "AddStickPointClientRpc");
((NetworkBehaviour)this).__initializeRpcs();
}
private static void __rpc_handler_1251977406(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0023: 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_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: 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_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Invalid comparison between Unknown and I4
NetworkManager networkManager = target.NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId)
{
if ((int)networkManager.LogLevel <= 1)
{
Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
}
}
else
{
target.__rpc_exec_stage = (__RpcExecStage)1;
((QBSpikeTrapDetect)(object)target).AddStickPointServerRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_4036922901(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0029: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
target.__rpc_exec_stage = (__RpcExecStage)1;
((QBSpikeTrapDetect)(object)target).AddStickPointClientRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
protected internal override string __getTypeName()
{
return "QBSpikeTrapDetect";
}
}
namespace BepInEx
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
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")]
internal sealed class PatcherAutoPluginAttribute : Attribute
{
public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
{
}
}
}
namespace CodeRebirth.src.MiscScripts
{
public class ShipAnimator : MonoBehaviour
{
public AnimationClip shipLandAnimation = null;
public AnimationClip shipNormalLeaveAnimation = null;
private Animator hangarShipAnimator = null;
public AnimationClip originalShipLandClip = null;
public AnimationClip originalShipLeaveClip = null;
private RuntimeAnimatorController animatorController = null;
public AnimatorOverrideController overrideController = null;
private void Start()
{
hangarShipAnimator = StartOfRound.Instance.shipAnimator;
animatorController = hangarShipAnimator.runtimeAnimatorController;
AnimationClip[] animationClips = animatorController.animationClips;
foreach (AnimationClip val in animationClips)
{
if (((Object)val).name == "HangarShipLandB")
{
originalShipLandClip = val;
}
else if (((Object)val).name == "ShipLeave")
{
originalShipLeaveClip = val;
}
}
((MonoBehaviour)this).StartCoroutine(WaitToReplaceClip());
}
private IEnumerator WaitToReplaceClip()
{
while (true)
{
Plugin.Logger.LogError((object)"REPLACING??");
yield return (object)new WaitUntil((Func<bool>)(() => RoundManager.Instance.currentLevel.sceneName == "CharlottesLabyrinth" && !StartOfRound.Instance.inShipPhase));
ReplaceAnimationClip();
Plugin.Logger.LogError((object)"REPLACED!!!");
yield return (object)new WaitUntil((Func<bool>)(() => RoundManager.Instance.currentLevel.sceneName != "CharlottesLabyrinth" || StartOfRound.Instance.inShipPhase));
Plugin.Logger.LogError((object)"UNREPLACED!!!");
UnReplaceAnimationClip();
}
}
private void ReplaceAnimationClip()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
overrideController = new AnimatorOverrideController(animatorController);
overrideController[originalShipLandClip] = shipLandAnimation;
overrideController[originalShipLeaveClip] = shipNormalLeaveAnimation;
hangarShipAnimator.runtimeAnimatorController = (RuntimeAnimatorController)(object)overrideController;
}
public void KillAllPlayersAnimEvent()
{
PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
foreach (PlayerControllerB val in allPlayerScripts)
{
if (!val.isPlayerControlled || val.isPlayerDead)
{
}
}
}
private void UnReplaceAnimationClip()
{
hangarShipAnimator.runtimeAnimatorController = animatorController;
}
}
}
namespace ExampleEnemy
{
public class QBController : EnemyAI
{
public enum State
{
Wander,
Sit,
Held
}
public BoxCollider collisionThing;
public BoxCollider interactCollider;
public BoxCollider scanNode;
public GameObject qbRagdollPrefab;
public PlayerControllerB playerHolding;
public QBPhysicsProp propScript;
public List<AudioClip> audioClips = new List<AudioClip>();
public Transform turnCompass = null;
public Transform attackArea = null;
public ParticleSystem deathParticles;
public float wanderMoveSpeed;
public float chaseMoveSpeed;
public float trySitInterval;
public float tryGetUpInterval;
private Coroutine dropQbCoroutine;
private Coroutine dropBabyCoroutine;
public List<Transform> qbRagdolls = new List<Transform>();
public List<Transform> qbRagdollAttachPoints = new List<Transform>();
private bool holdingQb = false;
private float timeSinceSatDown;
private float timeSinceLastSat;
private float timeSinceNewRandPos;
private float timeSinceAttacking;
private float timeSinceAlerted;
private float timeSinceDropped;
private Vector3 StalkPos;
private Random enemyRandom = null;
private bool isDeadAnimationDone;
[Header("State")]
public State stateType;
[Conditional("DEBUG")]
private void LogIfDebugBuild(string text)
{
}
public override void Start()
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
((EnemyAI)this).Start();
((GrabbableObject)propScript).originalScale = ((Component)this).transform.localScale;
timeSinceNewRandPos = 0f;
timeSinceAlerted = 0f;
enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex);
isDeadAnimationDone = false;
((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null);
base.isOutside = false;
}
public override void Update()
{
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
((EnemyAI)this).Update();
if (qbRagdolls.Count > 0 && qbRagdolls.Count == qbRagdollAttachPoints.Count)
{
int num = 0;
foreach (Transform qbRagdoll in qbRagdolls)
{
qbRagdoll.position = qbRagdollAttachPoints[num].position;
num++;
}
}
if (base.isEnemyDead)
{
if (!isDeadAnimationDone)
{
LogIfDebugBuild("Stopping enemy voice with janky code.");
isDeadAnimationDone = true;
StopSfxClientRpc();
}
}
else
{
timeSinceAttacking += Time.deltaTime;
timeSinceNewRandPos += Time.deltaTime;
timeSinceAlerted += Time.deltaTime;
timeSinceLastSat += Time.deltaTime;
timeSinceSatDown += Time.deltaTime;
timeSinceDropped += Time.deltaTime;
((EnemyAI)this).DoAIInterval();
}
}
public override void DoAIInterval()
{
if (stateType == State.Held)
{
return;
}
if (((NetworkBehaviour)this).IsServer)
{
((EnemyAI)this).DoAIInterval();
}
if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead || !((NetworkBehaviour)this).IsOwner)
{
return;
}
switch (stateType)
{
case State.Wander:
ChangeSpeedClientRpc(wanderMoveSpeed);
if (timeSinceLastSat > trySitInterval && timeSinceDropped > 2f)
{
float num2 = Random.Range(0, 100);
if (num2 < 25f)
{
PlaySoundClientRpc(0);
ChangeStateClientRpc(State.Sit);
DoAnimationClientRpc("sitDown");
timeSinceSatDown = 0f;
}
else
{
timeSinceLastSat = 0f;
}
}
break;
case State.Sit:
ChangeSpeedClientRpc(0f);
if (timeSinceSatDown > tryGetUpInterval)
{
float num = Random.Range(0, 100);
if (num < 25f)
{
PlaySoundClientRpc(1);
ChangeStateClientRpc(State.Wander);
DoAnimationClientRpc("getUp");
timeSinceLastSat = 0f;
}
else
{
timeSinceSatDown = 0f;
}
}
break;
default:
LogIfDebugBuild("This Behavior State doesn't exist!");
break;
}
}
[ClientRpc(/*Could not decode attribute arguments.*/)]
public void ChangeSpeedClientRpc(float speed)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: 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_00dc: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3023170820u, val, (RpcDelivery)1);
((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref speed, default(ForPrimitives));
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3023170820u, val, (RpcDelivery)1);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
base.agent.speed = speed;
}
}
}
[ClientRpc(/*Could not decode attribute arguments.*/)]
public void StopSfxClientRpc()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: 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)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2097491451u, val, (RpcDelivery)1);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2097491451u, val, (RpcDelivery)1);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
base.creatureVoice.Stop();
}
}
}
[ClientRpc(/*Could not decode attribute arguments.*/)]
public void ChangeSfxClipClientRpc(int clipNum)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2646090447u, val, (RpcDelivery)1);
BytePacker.WriteValueBitPacked(val2, clipNum);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2646090447u, val, (RpcDelivery)1);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
base.creatureSFX.clip = audioClips[clipNum];
base.creatureSFX.Play();
}
}
}
private bool FoundClosestPlayerInRange(float range, float senseRange)
{
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
((EnemyAI)this).TargetClosestPlayer(1.5f, true, 70f);
return (Object)(object)base.targetPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < range;
}
private bool TargetClosestPlayerInAnyCase()
{
//IL_001f: 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)
base.mostOptimalDistance = 2000f;
base.targetPlayer = null;
for (int i = 0; i < StartOfRound.Instance.connectedPlayersAmount + 1; i++)
{
base.tempDist = Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position);
if (base.tempDist < base.mostOptimalDistance)
{
base.mostOptimalDistance = base.tempDist;
base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i];
}
}
if ((Object)(object)base.targetPlayer == (Object)null)
{
return false;
}
return true;
}
public void HitFromTurret(Vector3 hitDirection)
{
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
if (!base.isEnemyDead)
{
base.enemyHP--;
if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead)
{
DeathServerRpc(hitDirection * 10f + hitDirection * 10f);
}
}
}
public override void HitFromExplosion(float distance)
{
//IL_0050: 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_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: 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)
((EnemyAI)this).HitFromExplosion(distance);
if (!base.isEnemyDead)
{
base.enemyHP--;
if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead)
{
DeathServerRpc(((Component)this).transform.forward * 50f + ((Component)this).transform.up * 50f);
}
}
}
public override void HitEnemy(int force = 1, PlayerControllerB? playerWhoHit = null, bool playHitSFX = false, int hitID = -1)
{
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID);
if (!base.isEnemyDead)
{
base.enemyHP -= force;
if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead)
{
DeathServerRpc(Vector3.down);
}
}
}
[ServerRpc]
public void DeathServerRpc(Vector3 bodyVelocity)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Invalid comparison between Unknown and I4
//IL_0114: 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_0139: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Invalid comparison between Unknown and I4
//IL_0160: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
{
if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
{
if ((int)networkManager.LogLevel <= 1)
{
Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
}
return;
}
ServerRpcParams val = default(ServerRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(276013623u, val, (RpcDelivery)0);
((FastBufferWriter)(ref val2)).WriteValueSafe(ref bodyVelocity);
((NetworkBehaviour)this).__endSendServerRpc(ref val2, 276013623u, val, (RpcDelivery)0);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
ChangeStateClientRpc(State.Held);
GameObject val3 = Object.Instantiate<GameObject>(qbRagdollPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation);
val3.GetComponent<NetworkObject>().Spawn(false);
Rigidbody[] componentsInChildren = val3.GetComponentsInChildren<Rigidbody>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
componentsInChildren[i].velocity = bodyVelocity;
}
((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f));
DeathClientRpc();
}
}
[ServerRpc]
public void SpikeTrapDeathServerRpc()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Invalid comparison between Unknown and I4
//IL_0107: Unknown result type (might be due to invalid IL or missing references)
//IL_0121: 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)
//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Invalid comparison between Unknown and I4
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
{
if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
{
if ((int)networkManager.LogLevel <= 1)
{
Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
}
return;
}
ServerRpcParams val = default(ServerRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2542553794u, val, (RpcDelivery)0);
((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2542553794u, val, (RpcDelivery)0);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
ChangeStateClientRpc(State.Held);
GameObject val3 = Object.Instantiate<GameObject>(qbRagdollPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation);
val3.GetComponent<NetworkObject>().Spawn(false);
qbRagdolls.Add(val3.transform);
((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f));
DeathClientRpc();
}
}
[ClientRpc(/*Could not decode attribute arguments.*/)]
public void DeathClientRpc()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: 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)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3269436166u, val, (RpcDelivery)1);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3269436166u, val, (RpcDelivery)1);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
((Collider)interactCollider).enabled = false;
((Collider)collisionThing).enabled = false;
((Collider)scanNode).enabled = false;
SkinnedMeshRenderer[] skinnedMeshRenderers = base.skinnedMeshRenderers;
foreach (SkinnedMeshRenderer val3 in skinnedMeshRenderers)
{
((Renderer)val3).enabled = false;
}
base.enemyHP = 1;
}
}
public IEnumerator DeathCoroutine(float delayTime)
{
yield return (object)new WaitForSeconds(delayTime);
if (RoundManager.Instance.allEnemyVents.Length != 0)
{
bool foundValidVent = false;
EnemyVent[] allEnemyVents = RoundManager.Instance.allEnemyVents;
foreach (EnemyVent enemyVent in allEnemyVents)
{
bool hasNearbyPlayer = false;
GameObject[] allPlayerObjects = StartOfRound.Instance.allPlayerObjects;
foreach (GameObject player in allPlayerObjects)
{
if (Vector3.Distance(player.transform.position, ((Component)enemyVent).transform.position) < 15f)
{
hasNearbyPlayer = true;
}
}
if (!hasNearbyPlayer)
{
foundValidVent = true;
((Collider)interactCollider).enabled = true;
((Collider)collisionThing).enabled = true;
((Collider)scanNode).enabled = true;
SkinnedMeshRenderer[] skinnedMeshRenderers = base.skinnedMeshRenderers;
foreach (SkinnedMeshRenderer skinnedMeshRenderer in skinnedMeshRenderers)
{
((Renderer)skinnedMeshRenderer).enabled = true;
}
((Behaviour)base.agent).enabled = false;
((Component)this).transform.position = ((Component)enemyVent.floorNode).transform.position;
((Behaviour)base.agent).enabled = true;
ChangeStateClientRpc(State.Wander);
break;
}
}
if (!foundValidVent)
{
((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f));
}
}
else
{
((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f));
}
}
[ClientRpc(/*Could not decode attribute arguments.*/)]
public void DoAnimationClientRpc(string animationName)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: 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)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1415340099u, val, (RpcDelivery)1);
bool flag = animationName != null;
((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
if (flag)
{
((FastBufferWriter)(ref val2)).WriteValueSafe(animationName, false);
}
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1415340099u, val, (RpcDelivery)1);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
LogIfDebugBuild("Animation: " + animationName);
base.creatureAnimator.SetTrigger(animationName);
}
}
[ClientRpc(/*Could not decode attribute arguments.*/)]
public void PlaySoundClientRpc(int index)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(132075797u, val, (RpcDelivery)1);
BytePacker.WriteValueBitPacked(val2, index);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 132075797u, val, (RpcDelivery)1);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
base.creatureVoice.PlayOneShot(audioClips[index]);
}
}
}
[ClientRpc]
public void ChangeStateClientRpc(State state)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Invalid comparison between Unknown and I4
//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: 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_00dc: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1389539681u, val, (RpcDelivery)0);
((FastBufferWriter)(ref val2)).WriteValueSafe<State>(ref state, default(ForEnums));
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1389539681u, val, (RpcDelivery)0);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost))
{
((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0;
stateType = state;
}
}
}
public void PickUpQBLocalClient()
{
base.currentOwnershipOnThisClient = (int)((GrabbableObject)propScript).playerHeldBy.playerClientId;
base.inSpecialAnimation = true;
((Behaviour)base.agent).enabled = false;
holdingQb = true;
if (dropQbCoroutine != null)
{
((MonoBehaviour)this).StopCoroutine(dropQbCoroutine);
}
if (((NetworkBehaviour)this).IsServer && stateType != State.Held)
{
ChangeStateClientRpc(State.Held);
DoAnimationClientRpc("pickUp");
}
playerHolding = ((GrabbableObject)propScript).playerHeldBy;
}
public void DropQbLocalClient()
{
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: 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_008b: 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_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: 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_00a3: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: 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_00b6: 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_00e0: 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_0195: Unknown result type (might be due to invalid IL or missing references)
//IL_019a: Unknown result type (might be due to invalid IL or missing references)
//IL_0174: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: Unknown result type (might be due to invalid IL or missing references)
//IL_0121: Unknown result type (might be due to invalid IL or missing references)
//IL_0135: Unknown result type (might be due to invalid IL or missing references)
//IL_013c: 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_014a: Unknown result type (might be due to invalid IL or missing references)
//IL_014f: Unknown result type (might be due to invalid IL or missing references)
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: 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_01e3: Unknown result type (might be due to invalid IL or missing references)
//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
holdingQb = false;
playerHolding = null;
timeSinceDropped = 0f;
if (base.currentBehaviourStateIndex != 0)
{
return;
}
if (((NetworkBehaviour)this).IsOwner)
{
((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId);
}
base.serverPosition = ((Component)this).transform.position;
bool flag = true;
Vector3 itemFloorPosition = ((GrabbableObject)propScript).GetItemFloorPosition(((Component)propScript.previousPlayerHeldBy).transform.position + Vector3.up * 0.5f);
Vector3 navMeshPosition = RoundManager.Instance.GetNavMeshPosition(itemFloorPosition, default(NavMeshHit), 10f, -1);
if (!RoundManager.Instance.GotNavMeshPositionResult || base.DebugEnemy)
{
flag = false;
itemFloorPosition = ((GrabbableObject)propScript).startFallingPosition;
if ((Object)(object)((Component)propScript).transform.parent != (Object)null)
{
itemFloorPosition = ((Component)propScript).transform.parent.TransformPoint(((GrabbableObject)propScript).startFallingPosition);
}
Transform val = ChooseClosestNodeToPositionNoPathCheck(itemFloorPosition);
navMeshPosition = RoundManager.Instance.GetNavMeshPosition(((Component)val).transform.position, default(NavMeshHit), 5f, -1);
}
if ((Object)(object)((Component)propScript).transform.parent == (Object)null)
{
((GrabbableObject)propScript).targetFloorPosition = navMeshPosition;
}
else
{
((GrabbableObject)propScript).targetFloorPosition = ((Component)propScript).transform.parent.InverseTransformPoint(navMeshPosition);
}
if (flag)
{
if (dropQbCoroutine != null)
{
((MonoBehaviour)this).StopCoroutine(dropQbCoroutine);
}
dropQbCoroutine = ((MonoBehaviour)this).StartCoroutine(DropQbAnimation(navMeshPosition));
}
else
{
((Component)this).transform.position = navMeshPosition;
base.inSpecialAnimation = false;
}
}
public Transform ChooseClosestNodeToPositionNoPathCheck(Vector3 pos)
{
//IL_0007: 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)
base.nodesTempArray = base.allAINodes.OrderBy((GameObject x) => Vector3.Distance(pos, x.transform.position)).ToArray();
return base.nodesTempArray[0].transform;
}
private IEnumerator DropQbAnimation(Vector3 dropOnPosition)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
DoAnimationClientRpc("drop");
float time = Time.realtimeSinceStartup;
yield return (object)new WaitUntil((Func<bool>)(() => ((GrabbableObject)propScript).reachedFloorTarget || Time.realtimeSinceStartup - time > 2f));
if (base.currentBehaviourStateIndex == 0)
{
((Component)this).transform.position = dropOnPosition;
base.inSpecialAnimation = false;
ChangeStateClientRpc(State.Wander);
}
dropQbCoroutine = null;
}
protected override void __initializeVariables()
{
((EnemyAI)this).__initializeVariables();
}
protected override void __initializeRpcs()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Expected O, but got Unknown
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Expected O, but got Unknown
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Expected O, but got Unknown
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: Expected O, but got Unknown
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Expected O, but got Unknown
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
//IL_00e0: Expected O, but got Unknown
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_00fc: Expected O, but got Unknown
((NetworkBehaviour)this).__registerRpc(3023170820u, new RpcReceiveHandler(__rpc_handler_3023170820), "ChangeSpeedClientRpc");
((NetworkBehaviour)this).__registerRpc(2097491451u, new RpcReceiveHandler(__rpc_handler_2097491451), "StopSfxClientRpc");
((NetworkBehaviour)this).__registerRpc(2646090447u, new RpcReceiveHandler(__rpc_handler_2646090447), "ChangeSfxClipClientRpc");
((NetworkBehaviour)this).__registerRpc(276013623u, new RpcReceiveHandler(__rpc_handler_276013623), "DeathServerRpc");
((NetworkBehaviour)this).__registerRpc(2542553794u, new RpcReceiveHandler(__rpc_handler_2542553794), "SpikeTrapDeathServerRpc");
((NetworkBehaviour)this).__registerRpc(3269436166u, new RpcReceiveHandler(__rpc_handler_3269436166), "DeathClientRpc");
((NetworkBehaviour)this).__registerRpc(1415340099u, new RpcReceiveHandler(__rpc_handler_1415340099), "DoAnimationClientRpc");
((NetworkBehaviour)this).__registerRpc(132075797u, new RpcReceiveHandler(__rpc_handler_132075797), "PlaySoundClientRpc");
((NetworkBehaviour)this).__registerRpc(1389539681u, new RpcReceiveHandler(__rpc_handler_1389539681), "ChangeStateClientRpc");
((EnemyAI)this).__initializeRpcs();
}
private static void __rpc_handler_3023170820(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//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)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
float speed = default(float);
((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref speed, default(ForPrimitives));
target.__rpc_exec_stage = (__RpcExecStage)1;
((QBController)(object)target).ChangeSpeedClientRpc(speed);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_2097491451(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0029: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
target.__rpc_exec_stage = (__RpcExecStage)1;
((QBController)(object)target).StopSfxClientRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_2646090447(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
int clipNum = default(int);
ByteUnpacker.ReadValueBitPacked(reader, ref clipNum);
target.__rpc_exec_stage = (__RpcExecStage)1;
((QBController)(object)target).ChangeSfxClipClientRpc(clipNum);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_276013623(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0023: 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_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Invalid comparison between Unknown and I4
NetworkManager networkManager = target.NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId)
{
if ((int)networkManager.LogLevel <= 1)
{
Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
}
}
else
{
Vector3 bodyVelocity = default(Vector3);
((FastBufferReader)(ref reader)).ReadValueSafe(ref bodyVelocity);
target.__rpc_exec_stage = (__RpcExecStage)1;
((QBController)(object)target).DeathServerRpc(bodyVelocity);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_2542553794(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0023: 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_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: 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_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Invalid comparison between Unknown and I4
NetworkManager networkManager = target.NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId)
{
if ((int)networkManager.LogLevel <= 1)
{
Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
}
}
else
{
target.__rpc_exec_stage = (__RpcExecStage)1;
((QBController)(object)target).SpikeTrapDeathServerRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_3269436166(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0029: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
target.__rpc_exec_stage = (__RpcExecStage)1;
((QBController)(object)target).DeathClientRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_1415340099(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//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 miss