Exemplo n.º 1
0
 protected internal override void Deserialize(BinaryReader br)
 {
     CarId = br.ReadByte();
     WorldPosition = readVector3f(br);
     Velocity = readVector3f(br);
     Gear = br.ReadByte();
     EngineRPM = br.ReadUInt16();
     NormalizedSplinePosition = br.ReadSingle();
 }
Exemplo n.º 2
0
 protected internal override void Deserialize(System.IO.BinaryReader br)
 {
     Subtype = br.ReadByte();
     CarId = br.ReadByte();
     if (Subtype == (byte)ACSProtocol.MessageType.ACSP_CE_COLLISION_WITH_CAR)
         OtherCarId = br.ReadByte();
     RelativeVelocity = br.ReadSingle();
     WorldPosition = readVector3f(br);
     RelativePosition = readVector3f(br);
 }
Exemplo n.º 3
0
        protected static Vector3f readVector3f(BinaryReader br)
        {
            Vector3f res = new Vector3f();

            res.X = br.ReadSingle();
            res.Y = br.ReadSingle();
            res.Z = br.ReadSingle();

            return res;
        }
Exemplo n.º 4
0
 protected static void writeVector3f(BinaryWriter bw, Vector3f vec)
 {
     bw.Write(vec.X);
     bw.Write(vec.Y);
     bw.Write(vec.Z);
 }