Skip to content

Commit

Permalink
Fix CGameCtnGhost 0x000 v9
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBang1112 committed Jan 31, 2024
1 parent 0e76252 commit 04b09d3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Src/GBX.NET/Engines/Game/CGameCtnGhost.cs
Expand Up @@ -489,8 +489,9 @@ public class Chunk03092000 : SkippableChunk<CGameCtnGhost>, IVersionable

public bool U03;
public int[]? U04;
public int U05;
public int AppearanceVersion;
public int? U06;
public string? U07;

public int Version { get => version; set => version = value; }

Expand All @@ -505,7 +506,7 @@ public override void ReadWrite(CGameCtnGhost n, GameBoxReaderWriter rw)

if (version >= 9)
{
rw.Int32(ref U05);
rw.Int32(ref AppearanceVersion);
}

// SGamePlayerMobilAppearanceParams::Archive
Expand All @@ -519,6 +520,11 @@ public override void ReadWrite(CGameCtnGhost n, GameBoxReaderWriter rw)
rw.Int32(ref n.badgeVersion);
rw.Archive<Badge>(ref n.badge, n.badgeVersion.GetValueOrDefault()); // NGameBadge::BadgeArchive
}

if (AppearanceVersion >= 1)
{
rw.String(ref U07);
}
//

rw.String(ref n.ghostNickname);
Expand All @@ -539,11 +545,6 @@ public override void ReadWrite(CGameCtnGhost n, GameBoxReaderWriter rw)

if (Version >= 5)
{
if (Version >= 9) // Not in code?
{
rw.Int32(ref U06);
}

rw.NodeRef<CPlugEntRecordData>(ref n.recordData);
rw.Array(ref U04);

Expand Down

0 comments on commit 04b09d3

Please sign in to comment.