public override void Read(CGameCtnCollection n, GameBoxReader r) { _ = r.ReadInt32(); _ = r.ReadIdent(); _ = r.ReadInt32(); _ = r.ReadInt32(); }
public override void Read(CGameCtnCollection n, GameBoxReader r, GameBoxWriter unknownW) { _ = r.ReadInt32(); _ = r.ReadIdent(); _ = r.ReadInt32(); _ = r.ReadInt32(); }
public override void Read(CGameCtnCollection n, GameBoxReader r, GameBoxWriter unknownW) { _ = r.ReadId(); _ = r.ReadInt32(); _ = r.ReadArray(x => r.ReadInt32()); _ = r.ReadInt32(); _ = r.ReadArray <float>(3); n.Vehicle = r.ReadIdent(); }
public override void Read(CGameCtnCollection n, GameBoxReader r) { _ = r.ReadId(); _ = r.ReadInt32(); _ = r.ReadArray(r1 => r1.ReadInt32()); _ = r.ReadInt32(); _ = r.ReadArray <float>(3); n.Vehicle = r.ReadIdent(); }
public override void Read(CGameCtnMacroBlockInfo n, GameBoxReader r, GameBoxWriter unknownW) { var unknown = r.ReadArray(i => { return(new object[] { r.ReadInt32(), r.ReadArray(j => r.ReadIdent()), r.ReadInt32(), r.ReadInt32(), r.ReadInt32() }); }); }
public override void Read(CGameCtnCollection n, GameBoxReader r, GameBoxWriter unknownW) { Version = r.ReadByte(); n.CollectionID = r.ReadByte(); _ = r.ReadBytes(6); n.CollectionPackMask = r.ReadByte(); n.DisplayName = r.ReadString(); _ = r.ReadInt32(); n.CollectionIcon = r.ReadString(); _ = r.ReadArray <int>(2); n.BlockInfoFlat = r.ReadId(this); n.Vehicle = r.ReadIdent(this); _ = r.ReadInt32(); _ = r.ReadArray <float>(4); n.LoadingScreen = r.ReadString(); _ = r.ReadArray <int>(7); _ = r.ReadString(); _ = r.ReadInt32(); }
public override void Read(CGameCtnReplayRecord n, GameBoxReader r) { Version = r.ReadInt32(); if (Version >= 2) { n.mapInfo = r.ReadIdent(); n.time = r.ReadInt32_msn(); n.playerNickname = r.ReadString(); if (Version >= 6) { n.playerLogin = r.ReadString(); if (Version >= 8) { U01 = r.ReadByte(); n.titleID = r.ReadId(); } } } }
public override void Read(CGameCtnReplayRecord n, GameBoxReader r, GameBoxWriter unknownW) { Version = r.ReadInt32(); if (Version >= 2) { n.MapInfo = r.ReadIdent(); n.Time = r.ReadTimeSpan(); n.Nickname = r.ReadString(); if (Version >= 6) { n.DriverLogin = r.ReadString(); if (Version >= 8) { U01 = r.ReadByte(); n.TitleID = r.ReadId(); } } } }
public override void Read(CGameCtnMacroBlockInfo n, GameBoxReader r, GameBoxWriter unknownW) { n.Blocks = r.ReadArray(i => { Int3?coord = null; Direction?dir = null; Vec3?position = null; Vec3?pitchYawRoll = null; var ver = r.ReadInt32(); var ident = r.ReadIdent(); int flags = 0; if (ver >= 2) { if (ver < 5) { } flags = r.ReadInt32(); if (ver >= 4) { if ((flags & (1 << 26)) != 0) // free block { position = r.ReadVec3(); pitchYawRoll = r.ReadVec3(); } else { coord = (Int3)r.ReadByte3(); dir = (Direction)r.ReadByte(); } } } if (ver >= 3) { if (r.ReadNodeRef() != null) { throw new NotImplementedException(); } } if (ver >= 4) { if (r.ReadNodeRef() != null) { throw new NotImplementedException(); } } var correctFlags = flags & 15; if ((flags & 0x20000) != 0) // Fixes inner pillars of some blocks { correctFlags |= 0x400000; } if ((flags & 0x10000) != 0) // Fixes ghost blocks { correctFlags |= 0x10000000; } var block = new CGameCtnBlock() { BlockInfo = ident, Coord = coord.GetValueOrDefault(), Direction = dir.GetValueOrDefault(), Flags = correctFlags }; if ((flags & (1 << 26)) != 0) { block.IsFree = true; block.AbsolutePositionInMap += position.GetValueOrDefault(); block.PitchYawRoll += pitchYawRoll.GetValueOrDefault(); } return(block); }).Where(x => x != null).ToArray(); }
public override void Read(CGameCtnMacroBlockInfo n, GameBoxReader r, GameBoxWriter unknownW) { Version = r.ReadInt32(); n.AnchoredObjects = r.ReadArray(i => { var v = r.ReadInt32(); var itemModel = r.ReadIdent(); Vec3 pitchYawRoll = default; Vec3 pivotPosition = default; float scale = 1; if (v < 3) { var quarterY = r.ReadByte(); if (v != 0) { var additionalDir = r.ReadByte(); } } else { pitchYawRoll = r.ReadVec3(); } var blockCoord = r.ReadInt3(); var lookback = r.ReadId(); var pos = r.ReadVec3(); if (v < 5) { r.ReadInt32(); } if (v < 6) { r.ReadInt32(); } if (v >= 6) { r.ReadInt16(); // 0 } if (v >= 7) { pivotPosition = r.ReadVec3(); } if (v >= 8) { r.ReadNodeRef(); // probably waypoint } if (v >= 9) { scale = r.ReadSingle(); // 1 } if (v >= 10) { r.ReadArray <int>(3); // 0 1 -1 } return(new CGameCtnAnchoredObject() { ItemModel = itemModel, PitchYawRoll = pitchYawRoll, BlockUnitCoord = (Byte3)blockCoord, AbsolutePositionInMap = pos, PivotPosition = pivotPosition, Scale = scale, }); }); var num = r.ReadInt32(); if (num == 1) { r.ReadInt32(); r.ReadInt32(); } }