diff --git a/Source/Coop/FreeCamera/FreeCamera.cs b/Source/Coop/FreeCamera/FreeCamera.cs index 1237721e..f516ec0e 100644 --- a/Source/Coop/FreeCamera/FreeCamera.cs +++ b/Source/Coop/FreeCamera/FreeCamera.cs @@ -25,7 +25,7 @@ public void Update() } var fastMode = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift); - var movementSpeed = fastMode ? 10f : 2f; + var movementSpeed = fastMode ? 20f : 3f; if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow)) { diff --git a/Source/Coop/FreeCamera/FreeCameraController.cs b/Source/Coop/FreeCamera/FreeCameraController.cs index 27183db3..853caa02 100644 --- a/Source/Coop/FreeCamera/FreeCameraController.cs +++ b/Source/Coop/FreeCamera/FreeCameraController.cs @@ -129,6 +129,10 @@ public void Update() DisableAndDestroyEffect(effectsController.GetComponent()); DisableAndDestroyEffect(effectsController.GetComponent()); DisableAndDestroyEffect(effectsController.GetComponent()); + DisableAndDestroyEffect(effectsController.GetComponent()); + DisableAndDestroyEffect(effectsController.GetComponent()); + DisableAndDestroyEffect(effectsController.GetComponent()); + //DisableAndDestroyEffect(effectsController.GetComponent()); var ccBlends = fpsCamInstance.EffectsController.GetComponents(); if (ccBlends != null) @@ -162,6 +166,14 @@ public void ToggleCamera() if (!_freeCamScript.IsActive) { + GameObject[] allGameObject = Resources.FindObjectsOfTypeAll(); + foreach (GameObject gobj in allGameObject) + { + if (gobj.GetComponent() != null) + { + gobj.GetComponent().ForceEnable(true); + } + } SetPlayerToFreecamMode(localPlayer); } else diff --git a/Source/Coop/SITGameModes/CoopSITGame.cs b/Source/Coop/SITGameModes/CoopSITGame.cs index c1f846e2..3c905b54 100644 --- a/Source/Coop/SITGameModes/CoopSITGame.cs +++ b/Source/Coop/SITGameModes/CoopSITGame.cs @@ -468,6 +468,7 @@ public BossLocationSpawn[] FixBossWaveSettings(WavesSettings wavesSettings, Loca #endif var bossLocationSpawns = location.BossLocationSpawn; + TimeSpan CurrentGameTime = GameDateTime.Calculate().TimeOfDay; if (!wavesSettings.IsBosses) { Logger.LogDebug($"{nameof(CoopSITGame)}:{nameof(FixBossWaveSettings)}: Bosses are disabled"); @@ -479,36 +480,39 @@ public BossLocationSpawn[] FixBossWaveSettings(WavesSettings wavesSettings, Loca Logger.LogDebug($"{nameof(FixBossWaveSettings)}:===BEFORE==="); Logger.LogDebug($"{nameof(FixBossWaveSettings)}:{bossLocationSpawn.ToJson()}"); #endif - List sourceEscortAmount; - try - { - sourceEscortAmount = bossLocationSpawn.BossEscortAmount.Split(',').Select(int.Parse).ToList(); - bossLocationSpawn.ParseMainTypesTypes(); - } - catch (Exception) - { - Logger.LogError($"{nameof(CoopSITGame)}:{nameof(FixBossWaveSettings)}: Unable to parse BossEscortAmount"); - continue; - } - float bossChance = bossLocationSpawn.BossChance; - if (CanSpawnCultist(GameWorldTime.Hour) && (bossLocationSpawn.BossType == WildSpawnType.sectantPriest || bossLocationSpawn.BossType == WildSpawnType.sectantWarrior)) + + if (!CanSpawnCultist(CurrentGameTime.Hours) && bossLocationSpawn.BossName.Contains("sectant")) { - Logger.LogDebug($"Block spawn of Sectant (Cultist) in day time in hour {GameWorldTime.Hour}!"); - bossChance = -1f; + Logger.LogDebug($"Block spawn of Sectant (Cultist) in day time in hour {CurrentGameTime.Hours}!"); + bossLocationSpawn.BossChance = 0f; } - bossLocationSpawn.BossChance = bossChance; - bossLocationSpawn.BossEscortAmount = sourceEscortAmount != null ? sourceEscortAmount.Max((int x) => x).ToString() : "1"; - if (bossLocationSpawn.Supports == null && !string.IsNullOrEmpty(bossLocationSpawn.BossEscortType) && !bossLocationSpawn.BossName.Equals("bossTagilla")) + + //ArchangelWTF: boss types like 'arenaFighterEvent' can have multiple values, split these out and take the first value. + //We could maybe do some fancy randomization here at some point to get a number in between the two values, but for now this works. + if (bossLocationSpawn.BossEscortAmount.Contains(",")) + bossLocationSpawn.BossEscortAmount = bossLocationSpawn.BossEscortAmount.Split(',')[0]; + + int EscortAmount = Convert.ToInt32(bossLocationSpawn.BossEscortAmount); + + if (bossLocationSpawn.Supports == null && !string.IsNullOrEmpty(bossLocationSpawn.BossEscortType) && EscortAmount > 0) { Logger.LogDebug($"bossLocationSpawn.Supports is Null. Attempt to create them."); - bossLocationSpawn.Supports = new WildSpawnSupports[1]; - bossLocationSpawn.Supports[0] = new WildSpawnSupports(); - bossLocationSpawn.Supports[0].BossEscortDifficult = new[] { "normal" }; - bossLocationSpawn.Supports[0].BossEscortAmount = 3; - if (Enum.TryParse(bossLocationSpawn.BossEscortType, out var t)) - bossLocationSpawn.Supports[0].BossEscortType = t; + Enum.TryParse(bossLocationSpawn.BossEscortType, out var EscortType); + + bossLocationSpawn.Supports = new WildSpawnSupports[EscortAmount]; + + for (int i = 0; i < EscortAmount; i++) + { + bossLocationSpawn.Supports[i] = new WildSpawnSupports + { + BossEscortDifficult = new[] { bossLocationSpawn.BossEscortDifficult }, + BossEscortAmount = 1, + BossEscortType = EscortType + }; + } } + #if DEBUG Logger.LogDebug($"{nameof(FixBossWaveSettings)}:===AFTER==="); Logger.LogDebug($"{nameof(FixBossWaveSettings)}:{bossLocationSpawn.ToJson()}"); @@ -524,13 +528,13 @@ private async Task CreatePhysicalBot(Profile profile, Vector3 posit if (SITMatchmaking.IsClient) return null; - if (Bots != null && Bots.Count(x => x.Value != null && x.Value.PlayerHealthController.IsAlive) >= MaxBotCount) + if (Bots != null && !profile.Info.Settings.IsBossOrFollower() && Bots.Count(x => x.Value != null && x.Value.PlayerHealthController.IsAlive) >= MaxBotCount) { Logger.LogDebug("Block spawn of Bot. Max Bot Count has been reached!"); return null; } - if (GameDateTime.Calculate().TimeOfDay < new TimeSpan(20, 0, 0) && profile.Info != null && profile.Info.Settings != null + if (!CanSpawnCultist(GameDateTime.Calculate().TimeOfDay.Hours) && profile.Info != null && profile.Info.Settings != null && (profile.Info.Settings.Role == WildSpawnType.sectantPriest || profile.Info.Settings.Role == WildSpawnType.sectantWarrior) ) {