using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using GameNetcodeStuff; using Microsoft.CodeAnalysis; 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("LCWeathers")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("LCWeathers")] [assembly: AssemblyTitle("LCWeathers")] [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 LCWeathers { public class GlowBugWeather : MonoBehaviour { public RoundManager? _roundManager; public GameObject? glowBugs; public GameObject? oldSunLight; public List? allPlayers; public List? playerChooseAmount; public float minTime; public float maxTime; public int targetPlayer; [Header("Outdoor Monsters")] public List? allHawks; public List? alldogs; public List? allGiants; public List? birdAI; public List? allCats; public List? allMechs; public List? allWorms; public List? foxAI; [Header("Indoor Monsters")] public List? allCrawlers; public List? allHoarders; public List? allFlies; public List? allSpiders; public List? allBlobs; public List? allClays; public List? allBees; public List? allButlers; public List? allBrakens; public List? allJesters; public List? allNutcrackers; public List? allCoils; public List? allStingrays; [Header("Other Monsters")] public List? allMasks; public List? allBlooms; private void Start() { allPlayers = new List(Object.FindObjectsOfType()); for (int i = 0; i < allPlayers.Count; i++) { playerChooseAmount.Add(10); } float waitTime = Random.Range(minTime, maxTime); ((MonoBehaviour)this).StartCoroutine(SelectPlayer(waitTime)); ((MonoBehaviour)this).StartCoroutine(ChangeScene()); } private void Update() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) glowBugs.transform.position = ((Component)allPlayers[targetPlayer]).gameObject.transform.position; if (!allPlayers[targetPlayer].isInsideFactory) { for (int i = 0; i < allHawks.Count; i++) { ((EnemyAI)allHawks[i]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allHawks[i]).movingTowardsTargetPlayer = true; } for (int j = 0; j < alldogs.Count; j++) { ((EnemyAI)alldogs[j]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)alldogs[j]).movingTowardsTargetPlayer = true; } for (int k = 0; k < allGiants.Count; k++) { ((EnemyAI)allGiants[k]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allGiants[k]).movingTowardsTargetPlayer = true; } for (int l = 0; l < allWorms.Count; l++) { ((EnemyAI)allWorms[l]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allWorms[l]).movingTowardsTargetPlayer = true; } for (int m = 0; m < allMechs.Count; m++) { ((EnemyAI)allMechs[m]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allMechs[m]).movingTowardsTargetPlayer = true; } for (int n = 0; n < allCats.Count; n++) { ((EnemyAI)allCats[n]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allCats[n]).movingTowardsTargetPlayer = true; } for (int num = 0; num < foxAI.Count; num++) { ((EnemyAI)foxAI[num]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)foxAI[num]).movingTowardsTargetPlayer = true; } for (int num2 = 0; num2 < birdAI.Count; num2++) { ((EnemyAI)birdAI[num2]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)birdAI[num2]).movingTowardsTargetPlayer = true; } } else { for (int num3 = 0; num3 < allBees.Count; num3++) { ((EnemyAI)allBees[num3]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allBees[num3]).movingTowardsTargetPlayer = true; } for (int num4 = 0; num4 < allButlers.Count; num4++) { ((EnemyAI)allButlers[num4]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allButlers[num4]).movingTowardsTargetPlayer = true; } for (int num5 = 0; num5 < allBrakens.Count; num5++) { ((EnemyAI)allBrakens[num5]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allBrakens[num5]).movingTowardsTargetPlayer = true; } for (int num6 = 0; num6 < allFlies.Count; num6++) { ((EnemyAI)allFlies[num6]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allFlies[num6]).movingTowardsTargetPlayer = true; } for (int num7 = 0; num7 < allCrawlers.Count; num7++) { ((EnemyAI)allCrawlers[num7]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allCrawlers[num7]).movingTowardsTargetPlayer = true; } for (int num8 = 0; num8 < allClays.Count; num8++) { ((EnemyAI)allClays[num8]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allClays[num8]).movingTowardsTargetPlayer = true; } for (int num9 = 0; num9 < allCoils.Count; num9++) { ((EnemyAI)allCoils[num9]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allCoils[num9]).movingTowardsTargetPlayer = true; } for (int num10 = 0; num10 < allBlobs.Count; num10++) { ((EnemyAI)allBlobs[num10]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allBlobs[num10]).movingTowardsTargetPlayer = true; } for (int num11 = 0; num11 < allSpiders.Count; num11++) { ((EnemyAI)allSpiders[num11]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allSpiders[num11]).movingTowardsTargetPlayer = true; } for (int num12 = 0; num12 < allHoarders.Count; num12++) { ((EnemyAI)allHoarders[num12]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allHoarders[num12]).movingTowardsTargetPlayer = true; } for (int num13 = 0; num13 < allNutcrackers.Count; num13++) { ((EnemyAI)allNutcrackers[num13]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allNutcrackers[num13]).movingTowardsTargetPlayer = true; } for (int num14 = 0; num14 < allJesters.Count; num14++) { ((EnemyAI)allJesters[num14]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allJesters[num14]).movingTowardsTargetPlayer = true; } for (int num15 = 0; num15 < allStingrays.Count; num15++) { ((EnemyAI)allStingrays[num15]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allStingrays[num15]).movingTowardsTargetPlayer = true; } } for (int num16 = 0; num16 < allMasks.Count; num16++) { ((EnemyAI)allMasks[num16]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allMasks[num16]).movingTowardsTargetPlayer = true; } for (int num17 = 0; num17 < allBlooms.Count; num17++) { if (((EnemyAI)allBlooms[num17]).isOutside && !allPlayers[targetPlayer].isInsideFactory) { ((EnemyAI)allBlooms[num17]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allBlooms[num17]).movingTowardsTargetPlayer = true; } else if (!((EnemyAI)allBlooms[num17]).isOutside && allPlayers[targetPlayer].isInsideFactory) { ((EnemyAI)allBlooms[num17]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allBlooms[num17]).movingTowardsTargetPlayer = true; } } } public IEnumerator SelectPlayer(float WaitTime) { playerChooseAmount.Clear(); for (int i = 0; i < allPlayers.Count; i++) { int amount = 10; if (!allPlayers[i].isPlayerControlled) { playerChooseAmount.Add(0); continue; } if (allPlayers[i].isInsideFactory) { amount += 10; } if (allPlayers[i].insanityLevel > 20f) { amount += 20; } if (allPlayers[i].isSprinting) { amount += 5; } if (targetPlayer == i) { amount -= 20; } amount += Mathf.RoundToInt(Mathf.Clamp((float)(100 - allPlayers[i].health) / 4.5f, 0f, 20f)); playerChooseAmount.Add(Mathf.RoundToInt(Mathf.Clamp((float)amount, 0f, float.PositiveInfinity))); } int totalAmount = 0; for (int j = 0; j < allPlayers.Count; j++) { totalAmount += playerChooseAmount[j]; } int randomNum = Random.Range(0, totalAmount); int trackingNum = 0; for (int k = 0; k < allPlayers.Count; k++) { trackingNum += playerChooseAmount[k]; if (randomNum < trackingNum) { targetPlayer = k; break; } } if (allPlayers[targetPlayer].isInHangarShipRoom) { WaitTime /= 2f; } allHawks.Clear(); allHawks = new List(Object.FindObjectsOfType()); alldogs.Clear(); alldogs = new List(Object.FindObjectsOfType()); allGiants.Clear(); allGiants = new List(Object.FindObjectsOfType()); allCats.Clear(); allCats = new List(Object.FindObjectsOfType()); birdAI.Clear(); birdAI = new List(Object.FindObjectsOfType()); allMechs.Clear(); allMechs = new List(Object.FindObjectsOfType()); foxAI.Clear(); foxAI = new List(Object.FindObjectsOfType()); allWorms.Clear(); allWorms = new List(Object.FindObjectsOfType()); allBlobs.Clear(); allBlobs = new List(Object.FindObjectsOfType()); allBees.Clear(); allBees = new List(Object.FindObjectsOfType()); allButlers.Clear(); allButlers = new List(Object.FindObjectsOfType()); allBrakens.Clear(); allBrakens = new List(Object.FindObjectsOfType()); allClays.Clear(); allClays = new List(Object.FindObjectsOfType()); allCoils.Clear(); allCoils = new List(Object.FindObjectsOfType()); allCrawlers.Clear(); allCrawlers = new List(Object.FindObjectsOfType()); allFlies.Clear(); allFlies = new List(Object.FindObjectsOfType()); allHoarders.Clear(); allHoarders = new List(Object.FindObjectsOfType()); allJesters.Clear(); allJesters = new List(Object.FindObjectsOfType()); allNutcrackers.Clear(); allNutcrackers = new List(Object.FindObjectsOfType()); allSpiders.Clear(); allSpiders = new List(Object.FindObjectsOfType()); allStingrays.Clear(); allStingrays = new List(Object.FindObjectsOfType()); allMasks.Clear(); allMasks = new List(Object.FindObjectsOfType()); allBlooms.Clear(); allBlooms = new List(Object.FindObjectsOfType()); glowBugs.transform.position = ((Component)allPlayers[targetPlayer]).gameObject.transform.position; glowBugs.transform.parent = ((Component)allPlayers[targetPlayer]).gameObject.transform; yield return (object)new WaitForSeconds(WaitTime); float time = Random.Range(minTime, maxTime); ((MonoBehaviour)this).StartCoroutine(SelectPlayer(time)); } public IEnumerator ChangeScene() { yield return (object)new WaitForSeconds(1f); oldSunLight = GameObject.Find("SunWithShadows"); if ((Object)(object)oldSunLight != (Object)null) { Object.Destroy((Object)(object)oldSunLight); _roundManager = Object.FindObjectOfType(); if ((Object)(object)_roundManager != (Object)null) { RoundManager? roundManager = _roundManager; roundManager.minEnemiesToSpawn += 2; RoundManager? roundManager2 = _roundManager; roundManager2.currentMaxInsidePower += 4f; RoundManager? roundManager3 = _roundManager; roundManager3.currentMaxOutsidePower += 5f; } } else { ((MonoBehaviour)this).StartCoroutine(ChangeScene()); } } } public class FireWeather : MonoBehaviour { public GameObject? fireObj; public int minDuration; public int maxDuration; public float duration; public float minSize; public float maxSize; public float peakSize; public float currentSize; public float smallestSize; public bool hitPeakSize; public int minSpawns; public int maxSpawns; public int spawnAmount; public int amountSpawned; public List? allPlayers; public List? allPlayerCooldowns; public int damage; public float damageTick; public Rigidbody? _rigidbody; private bool canDetectSize; public LayerMask groundLayerMask; private void Start() { allPlayers = new List(Object.FindObjectsOfType()); for (int i = 0; i < allPlayers.Count; i++) { allPlayerCooldowns.Add(0f); } maxSpawns = 4; duration = Random.Range((float)minDuration * 1f, (float)maxDuration * 1f); peakSize = Random.Range(minSize, maxSize); spawnAmount = Random.Range(minSpawns, maxSpawns); currentSize = 2f; smallestSize = 1.5f; ((MonoBehaviour)this).StartCoroutine(SpawnFlames(duration / 1.5f / (float)spawnAmount)); ((MonoBehaviour)this).StartCoroutine(RemoveFlame()); } private void Update() { //IL_0111: 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) for (int i = 0; i < allPlayers.Count; i++) { if (allPlayerCooldowns[i] > 0f) { allPlayerCooldowns[i] -= 1f * Time.deltaTime; if (allPlayerCooldowns[i] < 0f) { allPlayerCooldowns[i] = 0f; } } } if (!hitPeakSize) { currentSize += (peakSize - 1f) * Time.deltaTime / (duration / 2f); } else { currentSize -= (peakSize - 1f) * Time.deltaTime / (duration / 2f); } ((Component)this).transform.localScale = new Vector3(currentSize, currentSize, currentSize); if (currentSize > peakSize) { hitPeakSize = true; } if (currentSize < smallestSize && canDetectSize) { Debug.LogWarning((object)"Fire Removed Since it was too Small!"); Object.Destroy((Object)(object)((Component)this).gameObject); } if (((Component)this).transform.position.y < -60f) { Debug.LogWarning((object)"Fire Removed Since it fell under the map!"); Object.Destroy((Object)(object)((Component)this).gameObject); } } public void OnTriggerStay(Collider other) { //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) PlayerControllerB component = ((Component)other).GetComponent(); if (!((Object)(object)component != (Object)null)) { return; } int index = 0; for (int i = 0; i < allPlayers.Count; i++) { if ((Object)(object)allPlayers[i] == (Object)(object)component) { index = i; break; } } if (allPlayerCooldowns[index] <= 0f) { allPlayerCooldowns[index] = damageTick; allPlayers[index].DamagePlayer(damage, true, true, (CauseOfDeath)13, 0, false, default(Vector3)); } } public IEnumerator SpawnFlames(float separation) { yield return (object)new WaitForSeconds(separation); GameObject newFlame = Object.Instantiate(fireObj); newFlame.transform.position = new Vector3(((Component)this).transform.position.x + peakSize * 0.33f * (float)Random.Range(-1, 2) + Random.Range(-2f, 2f), ((Component)this).transform.position.y + 15f, ((Component)this).transform.position.z + peakSize * 0.33f * (float)Random.Range(-1, 2) + Random.Range(-2f, 2f)); Vector3 rayOrigin = new Vector3(newFlame.transform.position.x, newFlame.transform.position.y - 1f, newFlame.transform.position.z); bool hit = Physics.Raycast(rayOrigin, Vector3.down, 40f, LayerMask.op_Implicit(groundLayerMask)); Debug.DrawRay(rayOrigin, Vector3.down * 40f, Color.red); if (hit) { RaycastHit hit2 = default(RaycastHit); if (Physics.Raycast(rayOrigin, newFlame.transform.forward, ref hit2, 40f, LayerMask.op_Implicit(groundLayerMask))) { Debug.Log((object)"Placed Flame Due to Ray!"); newFlame.transform.position = new Vector3(0f, 0.9f, 0f) + ((RaycastHit)(ref hit2)).transform.position; Rigidbody flameBody = newFlame.GetComponent(); flameBody.isKinematic = true; newFlame.transform.parent = ((Component)this).transform.parent; amountSpawned++; } } else { Debug.Log((object)"Ray Failed!"); Object.Destroy((Object)(object)newFlame); } if (amountSpawned < spawnAmount) { ((MonoBehaviour)this).StartCoroutine(SpawnFlames(separation)); } } public IEnumerator RemoveFlame() { yield return (object)new WaitForSeconds(2f); List allFlames = new List(Object.FindObjectsOfType()); for (int i = 0; i < allFlames.Count; i++) { if (!((Object)(object)allFlames[i] == (Object)null) && !((Object)(object)((Component)allFlames[i]).gameObject == (Object)(object)((Component)this).gameObject)) { Vector3 val = ((Component)this).transform.position - ((Component)allFlames[i]).transform.position; if (((Vector3)(ref val)).magnitude < allFlames[i].peakSize / 5f) { Debug.LogWarning((object)"Fire Removed Since it was too close!"); Object.Destroy((Object)(object)((Component)this).gameObject); break; } } } _rigidbody.isKinematic = true; yield return (object)new WaitForSeconds(3f); canDetectSize = true; } } } namespace legmrModSnowScript { public class SnowWeather : MonoBehaviour { public Material? snowMat; public List? allPlayers; public HangarShipDoor? shipDoor; public List? playerColdLevels; public List? playerDefaultSpeed; public List? playerDefaultSprintTime; public float coldKillThreshHold = 50f; private Light? sunLight; public GameObject? oldFog = null; public MeshRenderer? meshRenderer = null; [Space(10f)] [Header("Distances to objects to feel warmth")] [SerializeField] private float distanceToShip; public float distanceToPlayer; public float distanceToHawk; public float distanceToDog; public float distanceToGiant; public float distanceToBird; public float distanceToCat; public float distanceToMech; [Space(5f)] public float warmthFromPlayer; public float warmthFromHawk; public float warmthFromDog; public float warmthFromGiant; public float warmthFromBird; public float warmthFromCat; public float warmthFromMech; [Space(8f)] public List? allHawks; public List? alldogs; public List? allGiants; public List? birdAI; public List? allCats; public List? allMechs; public List? foxAI; [Header("Freezing Variables")] public int speedReductionPercentPerStep; public int stepAmount; [SerializeField] private int maxColdWait; public int damagePerCold; public float damageIncrements; public List? playerStartedFreeze; public List? playerFreezeStartTimer; private void Start() { allPlayers = new List(Object.FindObjectsOfType()); shipDoor = Object.FindAnyObjectByType(); for (int i = 0; i < allPlayers.Count; i++) { playerColdLevels.Add(0f); playerStartedFreeze.Add(item: false); playerDefaultSpeed.Add(allPlayers[i].movementSpeed); playerFreezeStartTimer.Add(maxColdWait); playerDefaultSprintTime.Add(allPlayers[i].sprintTime); } ((MonoBehaviour)this).StartCoroutine(ChangeScene()); ((MonoBehaviour)this).StartCoroutine(SearchForMobs()); } public void ChangeTerrain() { meshRenderer = GameObject.Find("terrainMap").GetComponent(); if ((Object)(object)meshRenderer != (Object)null) { ((Renderer)meshRenderer).material = snowMat; ((Component)meshRenderer).gameObject.tag = "Snow"; return; } meshRenderer = GameObject.Find("Grid.001").GetComponent(); if ((Object)(object)meshRenderer != (Object)null) { ((Renderer)meshRenderer).material = snowMat; ((Component)meshRenderer).gameObject.tag = "Snow"; return; } meshRenderer = GameObject.Find("ArtificeTerrainCutDown").GetComponent(); if ((Object)(object)meshRenderer != (Object)null) { ((Renderer)meshRenderer).material = snowMat; ((Component)meshRenderer).gameObject.tag = "Snow"; } } private void FixedUpdate() { //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: 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_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0565: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_05f4: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_06a5: Unknown result type (might be due to invalid IL or missing references) //IL_06ba: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: Unknown result type (might be due to invalid IL or missing references) //IL_06c4: Unknown result type (might be due to invalid IL or missing references) bool flag = false; for (int i = 0; i < allPlayers.Count; i++) { flag = false; if (!allPlayers[i].isPlayerControlled || allPlayers[i].isPlayerDead) { continue; } if (playerColdLevels[i] < 0f) { playerColdLevels[i] = 0f; } if (playerColdLevels[i] > 50f) { playerColdLevels[i] = 50f; } if (allPlayers[i].isInsideFactory) { playerColdLevels[i] -= 0.25f * Time.deltaTime; continue; } if (allPlayers[i].isInHangarShipRoom) { if (shipDoor.doorPower != 1f && shipDoor.doorPower != 0f && !shipDoor.overheated) { playerColdLevels[i] -= 3.5f * Time.deltaTime; } else { playerColdLevels[i] -= 1.5f * Time.deltaTime; } continue; } Vector3 val; for (int j = 0; j < allMechs.Count; j++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)allMechs[j]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToMech) { flag = true; playerColdLevels[i] -= warmthFromMech * Time.deltaTime; break; } } int num = 0; for (int k = 0; k < allPlayers.Count; k++) { if (k != i && allPlayers[k].isPlayerDead) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)allPlayers[k]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToPlayer) { num++; } } } if (num >= 1) { playerColdLevels[i] -= warmthFromPlayer * (float)num * Time.deltaTime; continue; } for (int l = 0; l < allGiants.Count; l++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)allGiants[l]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToGiant) { flag = true; playerColdLevels[i] -= warmthFromGiant * Time.deltaTime; break; } } for (int m = 0; m < allCats.Count; m++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)allCats[m]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToCat) { flag = true; playerColdLevels[i] -= warmthFromCat * Time.deltaTime; break; } } for (int n = 0; n < alldogs.Count; n++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)alldogs[n]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToDog) { flag = true; playerColdLevels[i] -= warmthFromDog * Time.deltaTime; break; } } for (int num2 = 0; num2 < birdAI.Count; num2++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)birdAI[num2]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToBird) { flag = true; playerColdLevels[i] -= warmthFromBird * Time.deltaTime; break; } } for (int num3 = 0; num3 < allHawks.Count; num3++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)allHawks[num3]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToHawk) { flag = true; playerColdLevels[i] -= warmthFromHawk * Time.deltaTime; break; } } if (flag) { flag = false; continue; } val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)shipDoor).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToShip) { playerColdLevels[i] -= 0.1f * Time.deltaTime; } else if (!allPlayers[i].isInsideFactory) { playerColdLevels[i] += 1.5f * Time.deltaTime; } } for (int num4 = 0; num4 < allPlayers.Count; num4++) { if (!allPlayers[num4].isPlayerControlled || allPlayers[num4].isPlayerDead) { continue; } if (playerColdLevels[num4] < 0f) { playerColdLevels[num4] = 0f; } int num5 = 0; for (int num6 = Mathf.RoundToInt(playerColdLevels[num4]); num6 > 0; num6 -= stepAmount) { num5++; } allPlayers[num4].movementSpeed = Mathf.Clamp(playerDefaultSpeed[num4] - playerDefaultSpeed[num4] * ((float)speedReductionPercentPerStep / 100f) * (float)num5, playerDefaultSpeed[num4] / 2f, playerDefaultSpeed[num4]); allPlayers[num4].targetFOV = allPlayers[num4].targetFOV * Mathf.Clamp(1.5f - playerColdLevels[num4] / 30f, 0.5f, 1f); if (playerColdLevels[num4] >= coldKillThreshHold) { playerColdLevels[num4] = Mathf.Clamp(playerColdLevels[num4], 0f, 50f); allPlayers[num4].sprintTime = 0f; playerFreezeStartTimer[num4] -= 1f * Time.deltaTime; if (!playerStartedFreeze[num4] && playerFreezeStartTimer[num4] <= 0f) { playerStartedFreeze[num4] = true; ((MonoBehaviour)this).StartCoroutine(FreezePlayer(num4)); } } else { allPlayers[num4].sprintTime = playerDefaultSprintTime[num4]; } } } public IEnumerator SearchForMobs() { yield return (object)new WaitForSeconds(5f); allHawks.Clear(); allHawks = new List(Object.FindObjectsOfType()); for (int i = 0; i < allHawks.Count; i++) { ((EnemyAI)allHawks[i]).HitEnemy(1, (PlayerControllerB)null, false, -1); } alldogs.Clear(); alldogs = new List(Object.FindObjectsOfType()); for (int j = 0; j < alldogs.Count; j++) { ((EnemyAI)alldogs[j]).HitEnemy(1, (PlayerControllerB)null, false, -1); } allGiants.Clear(); allGiants = new List(Object.FindObjectsOfType()); for (int k = 0; k < allGiants.Count; k++) { ((EnemyAI)allGiants[k]).HitEnemy(1, (PlayerControllerB)null, false, -1); } allCats.Clear(); allCats = new List(Object.FindObjectsOfType()); for (int l = 0; l < allCats.Count; l++) { ((EnemyAI)allCats[l]).HitEnemy(1, (PlayerControllerB)null, false, -1); } birdAI.Clear(); birdAI = new List(Object.FindObjectsOfType()); for (int m = 0; m < birdAI.Count; m++) { ((EnemyAI)birdAI[m]).HitEnemy(1, (PlayerControllerB)null, false, -1); } foxAI.Clear(); foxAI = new List(Object.FindObjectsOfType()); for (int n = 0; n < foxAI.Count; n++) { ((EnemyAI)foxAI[n]).HitEnemy(1, (PlayerControllerB)null, false, -1); } allMechs.Clear(); allMechs = new List(Object.FindObjectsOfType()); ((MonoBehaviour)this).StartCoroutine(SearchForMobs()); } public IEnumerator FreezePlayer(int playerNum) { if (playerColdLevels[playerNum] >= coldKillThreshHold) { yield return (object)new WaitForSeconds(damageIncrements); allPlayers[playerNum].DamagePlayer(damagePerCold, true, true, (CauseOfDeath)5, 0, false, default(Vector3)); ((MonoBehaviour)this).StartCoroutine(FreezePlayer(playerNum)); } else { playerStartedFreeze[playerNum] = false; } } public IEnumerator ChangeScene() { yield return (object)new WaitForSeconds(1f); List suns = new List(Object.FindObjectsOfType()); if (suns.Count > 0) { for (int i = 0; i < suns.Count; i++) { if (((Object)((Component)suns[i]).transform.parent.parent.parent).name != "LightingNew") { oldFog = ((Component)suns[i]).gameObject; } else { _ = ((Component)suns[i]).gameObject; } } if ((Object)(object)oldFog != (Object)null) { oldFog.SetActive(false); } ChangeTerrain(); } else { ((MonoBehaviour)this).StartCoroutine(ChangeScene()); } } } }