diff --git a/DemoParser/src/Parser/Components/Abstract/UserMessage.cs b/DemoParser/src/Parser/Components/Abstract/UserMessage.cs index bfd11b1..45c3562 100644 --- a/DemoParser/src/Parser/Components/Abstract/UserMessage.cs +++ b/DemoParser/src/Parser/Components/Abstract/UserMessage.cs @@ -543,6 +543,7 @@ public static class SvcUserMessageFactory { UserMessageType.HapPunch => new HapPunch (dRef, val), UserMessageType.SPHapWeapEvent => new SpHapWeaponEvent (dRef, val), UserMessageType.WitchBloodSplatter => new WitchBloodSplatter(dRef, val), + UserMessageType.TransitionFade => new TransitionFade (dRef, val), UserMessageType.ScoreboardTempUpdate => new ScoreboardTempUpdate(dRef, val), _ => null // I do a check for this so that I don't have to allocate the unknown type twice }; diff --git a/DemoParser/src/Parser/Components/Messages/UserMessages/TransitionFade.cs b/DemoParser/src/Parser/Components/Messages/UserMessages/TransitionFade.cs new file mode 100644 index 0000000..283285d --- /dev/null +++ b/DemoParser/src/Parser/Components/Messages/UserMessages/TransitionFade.cs @@ -0,0 +1,24 @@ +using DemoParser.Parser.Components.Abstract; +using DemoParser.Utils; +using DemoParser.Utils.BitStreams; + +namespace DemoParser.Parser.Components.Messages.UserMessages { + + public class TransitionFade : UserMessage { + + public float Seconds; + + + public TransitionFade(SourceDemo? demoRef, byte value) : base(demoRef, value) {} + + + protected override void Parse(ref BitStreamReader bsr) { + Seconds = bsr.ReadFloat(); + } + + + public override void PrettyWrite(IPrettyWriter pw) { + pw.Append($"seconds: {Seconds}"); + } + } +}