using System; using System.Collections; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using GameNetcodeStuff; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("legmrModSnowScript")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("legmrModSnowScript")] [assembly: AssemblyTitle("legmrModSnowScript")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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; } } } namespace legmrModSnowScript { public class FestiveSnowmanTracking : MonoBehaviour { public int explodeChance; public int[]? playerUses; public string[]? playerNames; public GameObject[]? heldPlayers; public PlayerControllerB[]? playerControlls; public int[]? privleges; public GameObject? playerParent; public GameObject? shotGunAmmoObject; public SnowManUse? creator; public int listNumber; public bool shellBegin0 = false; public bool shellBegin1 = false; public bool shellBegin2 = false; public bool shellBegin3 = false; public bool enemyGold = false; public static bool active; public bool comander = false; public void Update() { playerControlls = Object.FindObjectsOfType(); for (int i = 0; i < heldPlayers.Length; i++) { heldPlayers[i] = ((Component)playerControlls[i]).gameObject; } for (int j = 0; j < playerNames.Length; j++) { playerNames[j] = playerControlls[j].playerUsername; } for (int k = 0; k > playerNames.Length; k++) { playerControlls[k].movementSpeed = 4.6f + (float)playerUses[k] * 0.3f; playerControlls[k].sprintTime = 11f + (float)playerUses[k] * 0.3f; if (playerUses[k] >= 15 && !shellBegin0) { ((MonoBehaviour)this).StartCoroutine(ShellCoroutine(0)); } if (playerControlls[k].isPlayerDead) { playerUses[k] = 0; } } } private IEnumerator ShellCoroutine(int playerNum) { shellBegin0 = true; yield return (object)new WaitForSeconds(60f); if (heldPlayers != null) { Object.Instantiate(shotGunAmmoObject, heldPlayers[playerNum].transform.position, Quaternion.identity); ((MonoBehaviour)this).StartCoroutine(ShellCoroutine(playerNum)); } } } public class SnowManUse : GrabbableObject { public GameObject? variablesObject; public FestiveSnowmanTracking? variablesObjectScript; public AudioSource? useSound; public int explodeNum; public GameObject? particle1; public GameObject? particle2; public GameObject? particle3; public override void ItemActivate(bool used, bool buttonDown = true) { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) if (base.playerHeldBy.isInHangarShipRoom) { return; } useSound.PlayOneShot(useSound.clip); WalkieTalkie.TransmitOneShotAudio(useSound, useSound.clip, 0.7f); for (int i = 0; i < variablesObjectScript.playerNames.Length; i++) { if (base.playerHeldBy.playerUsername == variablesObjectScript.playerNames[i]) { variablesObjectScript.playerUses[i]++; int num = Random.Range(1, 200); if (num == explodeNum) { variablesObjectScript.playerUses[0] = 0; particle1.SetActive(true); particle2.SetActive(true); particle3.SetActive(true); SpawnExplosion(((Component)this).transform.position + Vector3.up, spawnExplosionEffect: false, 5.7f, 6f); ((MonoBehaviour)this).StartCoroutine(ParticleRemove()); } } } } public static void SpawnExplosion(Vector3 explosionPosition, bool spawnExplosionEffect = false, float killRange = 1f, float damageRange = 1f, int nonLethalDamage = 50, float physicsForce = 0f, GameObject overridePrefab = null, bool goThroughCar = false) { //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_003b: 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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_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_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_042b: 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_0432: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: 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_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) if (spawnExplosionEffect) { GameObject val = ((!((Object)(object)overridePrefab != (Object)null)) ? Object.Instantiate(StartOfRound.Instance.explosionPrefab, explosionPosition, Quaternion.Euler(-90f, 0f, 0f), RoundManager.Instance.mapPropsContainer.transform) : Object.Instantiate(overridePrefab, explosionPosition, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform)); val.SetActive(true); } float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, explosionPosition); if (num < 14f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (num < 25f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } bool flag = false; Collider[] array = Physics.OverlapSphere(explosionPosition, damageRange, 2621448, (QueryTriggerInteraction)2); PlayerControllerB val2 = null; RaycastHit val3 = default(RaycastHit); Vector3 val5; for (int i = 0; i < array.Length; i++) { float num2 = Vector3.Distance(explosionPosition, ((Component)array[i]).transform.position); if (Physics.Linecast(explosionPosition, ((Component)array[i]).transform.position + Vector3.up * 0.3f, ref val3, 1073742080, (QueryTriggerInteraction)1) && ((!goThroughCar && ((Component)((RaycastHit)(ref val3)).collider).gameObject.layer == 30) || num2 > 4f)) { continue; } if (((Component)array[i]).gameObject.layer == 3 && !flag) { val2 = ((Component)array[i]).gameObject.GetComponent(); if ((Object)(object)val2 != (Object)null && ((NetworkBehaviour)val2).IsOwner) { flag = true; if (num2 < killRange) { Vector3 val4 = Vector3.Normalize(((Component)val2.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)val2.gameplayCamera).transform.position, explosionPosition); PlayerControllerB obj = val2; val5 = default(Vector3); obj.KillPlayer(val4, true, (CauseOfDeath)3, 0, val5); } else if (num2 < damageRange) { Vector3 val6 = Vector3.Normalize(((Component)val2.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)val2.gameplayCamera).transform.position, explosionPosition); val2.DamagePlayer(nonLethalDamage, true, true, (CauseOfDeath)3, 0, false, val6); } } } else if (((Component)array[i]).gameObject.layer == 19) { EnemyAICollisionDetect componentInChildren = ((Component)array[i]).gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null && ((NetworkBehaviour)componentInChildren.mainScript).IsOwner && num2 < 4.5f) { EnemyAI mainScript = componentInChildren.mainScript; val5 = default(Vector3); mainScript.HitEnemyOnLocalClient(6, val5, (PlayerControllerB)null, false, -1); componentInChildren.mainScript.HitFromExplosion(num2); } } } val2 = GameNetworkManager.Instance.localPlayerController; if (physicsForce > 0f && Vector3.Distance(((Component)val2).transform.position, explosionPosition) < 35f && !Physics.Linecast(explosionPosition, ((Component)val2).transform.position + Vector3.up * 0.3f, ref val3, 256, (QueryTriggerInteraction)1)) { float num3 = Vector3.Distance(((Component)val2).transform.position, explosionPosition); Vector3 val7 = Vector3.Normalize(((Component)val2).transform.position + Vector3.up * num3 - explosionPosition) / (num3 * 0.35f) * physicsForce; if (((Vector3)(ref val7)).magnitude > 2f) { if (((Vector3)(ref val7)).magnitude > 10f) { val2.CancelSpecialTriggerAnimations(); } if (val2.inVehicleAnimation) { val5 = val2.externalForceAutoFade + val7; if (!(((Vector3)(ref val5)).magnitude > 50f)) { goto IL_043f; } } PlayerControllerB obj2 = val2; obj2.externalForceAutoFade += val7; } } goto IL_043f; IL_043f: VehicleController val8 = Object.FindObjectOfType(); if ((Object)(object)val8 != (Object)null && !val8.magnetedToShip && physicsForce > 0f && Vector3.Distance(((Component)val8).transform.position, explosionPosition) < 35f) { val8.mainRigidbody.AddExplosionForce(physicsForce * 50f, explosionPosition, 12f, 3f, (ForceMode)1); } int num4 = ~LayerMask.GetMask(new string[1] { "Room" }); num4 = ~LayerMask.GetMask(new string[1] { "Colliders" }); array = Physics.OverlapSphere(explosionPosition, 10f, num4); for (int j = 0; j < array.Length; j++) { Rigidbody component = ((Component)array[j]).GetComponent(); if ((Object)(object)component != (Object)null) { component.AddExplosionForce(70f, explosionPosition, 10f); } } } public IEnumerator ParticleRemove() { yield return (object)new WaitForSeconds(5f); particle1.SetActive(false); particle2.SetActive(false); particle3.SetActive(false); } } }