diff --git a/G2WwiseDataTool/EventWriter.cs b/G2WwiseDataTool/EventWriter.cs index 754366a..06230e9 100644 --- a/G2WwiseDataTool/EventWriter.cs +++ b/G2WwiseDataTool/EventWriter.cs @@ -26,7 +26,7 @@ public class Entry public string eventObjectPath = ""; public string eventAssemblyPath = ""; public string eventNameHash = ""; - public float unknownFloat = -1; // Max Attenuation Radius? (the game uses the value in the soundbank instead so changing this does absolutely nothing) + public float eventMaxAttenuation = -1; // doesn't seem to affect anything in-game, probably used for debugging purposes. public string outputPath = ""; public bool isStreamed = false; public bool isPrefetched = false; @@ -55,7 +55,7 @@ public static void WriteWWEV(ref Event wwev) writer.Write(eventNameLength + 0x1); writer.Write(eventNameBytes); writer.Write((sbyte)0x0); // Padding - writer.Write(wwev.unknownFloat); + writer.Write(wwev.eventMaxAttenuation); if (wwev.isStreamed) { diff --git a/G2WwiseDataTool/SoundbanksInfoParser.cs b/G2WwiseDataTool/SoundbanksInfoParser.cs index 93da5f4..6e5fe4e 100644 --- a/G2WwiseDataTool/SoundbanksInfoParser.cs +++ b/G2WwiseDataTool/SoundbanksInfoParser.cs @@ -60,6 +60,16 @@ public static void ReadSoundbankInfo(string inputPath, string outputPath, bool s wwev.eventName = eventNode.Attributes["Name"].Value; wwev.eventObjectPath = eventNode.Attributes["ObjectPath"].Value; + + if (eventNode.Attributes["MaxAttenuation"] != null && eventNode.Attributes["MaxAttenuation"].Value != "") + { + wwev.eventMaxAttenuation = float.Parse(eventNode.Attributes["MaxAttenuation"].Value); + } + else + { + wwev.eventMaxAttenuation = -1.0f; + } + if (eventNode.Name == "Event") { wwev.eventAssemblyPath = "[assembly:/sound/wwise/exportedwwisedata" + wwev.eventObjectPath + ".wwiseevent].pc_wwisebank";