Пример #1
0
        public NavGridCell ReadGridCell_Version7()
        {
            var result = new NavGridCell
            {
                CenterHeight = _reader.ReadSingle(),
                SessionId    = _reader.ReadUInt32(),
                ArrivalCost  = _reader.ReadSingle(),
                IsOpen       = _reader.ReadUInt32() == 1,
                Heuristic    = _reader.ReadSingle(),
                X            = _reader.ReadInt16(),
                Y            = _reader.ReadInt16(),
                ActorList    = _reader.ReadUInt32()
            };

            _reader.ReadUInt32(); // <- "Unk1"
            result.GoodCellSessionId = _reader.ReadUInt32();
            result.RefHintWeight     = _reader.ReadSingle();
            _reader.ReadUInt16();   // <- "Unk2"
            result.ArrivalDirection = _reader.ReadInt16();
            result.RefHintNode      = new short[2];
            result.RefHintNode[0]   = _reader.ReadInt16();
            result.RefHintNode[1]   = _reader.ReadInt16();

            return(result);
        }
Пример #2
0
        public NavGridCell ReadGridCell_Version5(out ushort flag)
        {
            var result = new NavGridCell
            {
                CenterHeight           = _reader.ReadSingle(),
                SessionId              = _reader.ReadUInt32(),
                ArrivalCost            = _reader.ReadSingle(),
                IsOpen                 = _reader.ReadUInt32() == 1,
                Heuristic              = _reader.ReadSingle(),
                ActorList              = _reader.ReadUInt32(),
                X                      = _reader.ReadInt16(),
                Y                      = _reader.ReadInt16(),
                AdditionalCost         = _reader.ReadSingle(),
                HintAsGoodCell         = _reader.ReadSingle(),
                AdditionalCostRefCount = _reader.ReadUInt32(),
                GoodCellSessionId      = _reader.ReadUInt32(),
                RefHintWeight          = _reader.ReadSingle(),
                ArrivalDirection       = _reader.ReadInt16()
            };

            flag = _reader.ReadUInt16();
            result.RefHintNode    = new short[2];
            result.RefHintNode[0] = _reader.ReadInt16();
            result.RefHintNode[1] = _reader.ReadInt16();

            return(result);
        }