Skip to content

Commit

Permalink
Implement support for UE2.5's "USoundGroup".
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotVU committed Nov 2, 2022
1 parent a4d3af8 commit 09c7624
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/Engine/Classes/USoundGroup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using UELib.Branch;

namespace UELib.Core
{
/// <summary>
/// Implements USoundGroup/Engine.SoundGroup
/// </summary>
[UnrealRegisterClass]
[BuildGeneration(BuildGeneration.UE2_5)]
public class USoundGroup : USound
{
// p.s. It's not safe to cast to USound
public UArray<UObject> Sounds;

protected override void Deserialize()
{
base.Deserialize();
#if UT
if ((Package.Build == UnrealPackage.GameBuild.BuildName.UT2004 ||
Package.Build == UnrealPackage.GameBuild.BuildName.UT2003)
&& _Buffer.LicenseeVersion < 27)
{
_Buffer.Read(out string package);
Record(nameof(package), package);
}
#endif
_Buffer.ReadArray(out Sounds);
}
}
}

0 comments on commit 09c7624

Please sign in to comment.