예제 #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);
        }