コード例 #1
0
ファイル: Packet.cs プロジェクト: OBASI/c-raft
        public override void Read(PacketReader stream)
        {
            //X,Y,Stance are in different order for Client->Server vs. Server->Client
            if (Packet.Role == StreamRole.Server)
            {
                X = stream.ReadDouble();
                Stance = stream.ReadDouble();
                Y = stream.ReadDouble();

            }
            else
            {
                X = stream.ReadDouble();
                Y = stream.ReadDouble();
                Stance = stream.ReadDouble();
            }
            Z = stream.ReadDouble();
            Console.WriteLine("Receiving Position: {0},{1},{2}", X, Y, Z);
            Yaw = stream.ReadFloat();
            Pitch = stream.ReadFloat();
            OnGround = stream.ReadBool();
        }
コード例 #2
0
ファイル: Packet.cs プロジェクト: OBASI/c-raft
        public override void Read(PacketReader stream)
        {
            X = stream.ReadDouble();
            Y = stream.ReadDouble();
            Z = stream.ReadDouble();
            Radius = stream.ReadFloat();
            Offsets = new sbyte[stream.ReadInt(), 3];
            for (int i = 0; i < Offsets.GetLength(0); i++)
            {
                Offsets[i, 0] = stream.ReadSByte();
                Offsets[i, 1] = stream.ReadSByte();
                Offsets[i, 2] = stream.ReadSByte();
            }

            UnknownA = stream.ReadFloat();
            UnknownB = stream.ReadFloat();
            UnknownC = stream.ReadFloat();
        }
コード例 #3
0
ファイル: Packet.cs プロジェクト: OBASI/c-raft
 public override void Read(PacketReader stream)
 {
     X = stream.ReadDouble();
     Y = stream.ReadDouble();
     Stance = stream.ReadDouble();
     Z = stream.ReadDouble();
     OnGround = stream.ReadBool();
 }
コード例 #4
0
ファイル: Packet.cs プロジェクト: dekema2/c-raft
 public override void Read(PacketReader stream)
 {
     //X,Y,Stance are in different order for Client->Server vs. Server->Client
     if (Packet.Role == StreamRole.Server)
     {
         X = stream.ReadDouble();
         Stance = stream.ReadDouble();
         Y = stream.ReadDouble();
     }
     else
     {
         X = stream.ReadDouble();
         Y = stream.ReadDouble();
         Stance = stream.ReadDouble();
     }
     Z = stream.ReadDouble();
     Yaw = stream.ReadFloat();
     Pitch = stream.ReadFloat();
     OnGround = stream.ReadBool();
 }