Skip to content

Commit

Permalink
skip ghost chunk when eventsduration is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ozontm committed Jan 20, 2025
1 parent ad1785f commit dcf7970
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/ManiaPlanetSharp/GameBox/Parsing/Chunks/Ghost/GhostChunk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,36 @@ public class GhostChunk
[Property]
public uint EventsDuration { get; set; }

[Property]
[Property, Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public uint Ignored { get; set; }

[Property(SpecialPropertyType.LookbackString), Array]
[Property(SpecialPropertyType.LookbackString), Array, Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public string[] ControlNames { get; set; }

[Property]
[EditorBrowsable(EditorBrowsableState.Never)]
[EditorBrowsable(EditorBrowsableState.Never), Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public uint ControlEntryCount { get; set; }

[Property]
[Property, Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public uint Unknown { get; set; }

[Property, Array(nameof(ControlEntryCount))]
[Property, Array(nameof(ControlEntryCount)), Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public GhostControlEntry[] ControlEntries { get; set; }

[Property(SpecialPropertyType.LongString)]
[Property(SpecialPropertyType.LongString), Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public string GameVersion { get; set; }

[Property]
[Property, Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public uint ExecutableChecksum { get; set; }

[Property]
[Property, Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public uint OSKind { get; set; }

[Property]
[Property, Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public uint CPUKind { get; set; }

private string raceSettingsXmlString;
[Property]
[Property, Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public string RaceSettingsXmlString
{
get
Expand All @@ -63,7 +63,7 @@ public string RaceSettingsXmlString

//public GhostRaceSettingsRoot Root { get; set; }

[Property]
[Property, Condition(nameof(EventsDuration), ConditionOperator.GreaterThan, 0)]
public uint Unknown2 { get; set; }
}

Expand Down

0 comments on commit dcf7970

Please sign in to comment.