diff --git a/FMOD Project/Metadata/Event/{3215328c-b376-4534-829e-341cfa9384ce}.xml b/FMOD Project/Metadata/Event/{3215328c-b376-4534-829e-341cfa9384ce}.xml index fec2c922..d69e021c 100644 --- a/FMOD Project/Metadata/Event/{3215328c-b376-4534-829e-341cfa9384ce}.xml +++ b/FMOD Project/Metadata/Event/{3215328c-b376-4534-829e-341cfa9384ce}.xml @@ -5,7 +5,7 @@ player_death - 1 + 2 {18ed83b5-f268-4ef4-aa2f-e4917c0f1443} @@ -67,9 +67,6 @@ - - 1 - 3 @@ -140,6 +137,7 @@ {b18569bf-9d3b-4f8f-bf74-94ae089116a7} + {3871e5d2-2162-480e-af1f-8a09872bdfa2} @@ -165,6 +163,7 @@ + duration diff --git a/SCHIZO/Resources/AssetBundles/Assets.cs b/SCHIZO/Resources/AssetBundles/Assets.cs index fe80922c..cf77f98f 100644 --- a/SCHIZO/Resources/AssetBundles/Assets.cs +++ b/SCHIZO/Resources/AssetBundles/Assets.cs @@ -12,7 +12,7 @@ namespace SCHIZO.Resources; public static class Assets { - private const int _rnd = -2110179037; + private const int _rnd = -353940074; private static readonly UnityEngine.AssetBundle _a = ResourceManager.GetAssetBundle("assets"); diff --git a/SCHIZO/Resources/AssetBundles/assets b/SCHIZO/Resources/AssetBundles/assets index 0db23728..1cf8018b 100644 Binary files a/SCHIZO/Resources/AssetBundles/assets and b/SCHIZO/Resources/AssetBundles/assets differ diff --git a/SCHIZO/Resources/FMODBanks/SCHIZO.bank b/SCHIZO/Resources/FMODBanks/SCHIZO.bank index 96b47e2a..5b263840 100644 Binary files a/SCHIZO/Resources/FMODBanks/SCHIZO.bank and b/SCHIZO/Resources/FMODBanks/SCHIZO.bank differ diff --git a/SCHIZO/Sounds/Patches/PlayerDeathSoundsPatches.cs b/SCHIZO/Sounds/Patches/PlayerDeathSoundsPatches.cs index 61612119..90203289 100644 --- a/SCHIZO/Sounds/Patches/PlayerDeathSoundsPatches.cs +++ b/SCHIZO/Sounds/Patches/PlayerDeathSoundsPatches.cs @@ -1,8 +1,6 @@ -using System.Collections.Generic; -using System.Linq; using HarmonyLib; -using SCHIZO.Helpers; using SCHIZO.Sounds.Players; +using UnityEngine; namespace SCHIZO.Sounds.Patches; @@ -13,13 +11,9 @@ internal static class PlayerDeathSoundsPatches [HarmonyPostfix] public static void PlayDeathSound() { - List deathSoundPlayers = Inventory.main.container.Select(item => item.item.gameObject) - .SelectComponent() - .ToList(); - if (deathSoundPlayers.Count == 0) return; - PlayerDeathSoundPlayer player = deathSoundPlayers.Count == 1 - ? deathSoundPlayers[0] - : deathSoundPlayers.GetRandom(); - player.PlayOneShot(); + foreach (PlayerDeathSoundPlayer sndPlayer in UnityEngine.Resources.FindObjectsOfTypeAll()) + { + sndPlayer.Play(Random.Range(0, 0.5f)); + } } } diff --git a/Unity/Assets/Mod/Ermfish/Ermfish.prefab b/Unity/Assets/Mod/Ermfish/Ermfish.prefab index 6be775c4..46454ff4 100644 --- a/Unity/Assets/Mod/Ermfish/Ermfish.prefab +++ b/Unity/Assets/Mod/Ermfish/Ermfish.prefab @@ -454,7 +454,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: soundEvent: event:/SCHIZO/creatures/ermfish/player_death - emitter: {fileID: 0} + emitter: {fileID: 5648931341203019549} --- !u!114 &5574741202301287243 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Unity/Assets/Scripts/SCHIZO/Sounds/Players/PlayerDeathSoundPlayer.cs b/Unity/Assets/Scripts/SCHIZO/Sounds/Players/PlayerDeathSoundPlayer.cs index 15e838d3..7df9854c 100644 --- a/Unity/Assets/Scripts/SCHIZO/Sounds/Players/PlayerDeathSoundPlayer.cs +++ b/Unity/Assets/Scripts/SCHIZO/Sounds/Players/PlayerDeathSoundPlayer.cs @@ -2,6 +2,6 @@ namespace SCHIZO.Sounds.Players { public sealed partial class PlayerDeathSoundPlayer : SoundPlayer { - protected override bool Is3D => false; + protected override bool Is3D => true; } }