public static void WriteMovementDriverHomingData(this ByteWriter writer, MovementDriverHomingData data) { writer.WriteUInt32(data.TargetNetID); writer.WriteFloat(data.TargetHeightModifier); writer.WriteVector3(data.TargetPosition); writer.WriteFloat(data.Speed); writer.WriteFloat(data.Gravity); writer.WriteFloat(data.RateOfTurn); writer.WriteFloat(data.Duration); writer.WriteUInt32(data.MovementPropertyFlags); }
public static MovementDriverHomingData ReadMovementDriverHomingData(this ByteReader reader) { var data = new MovementDriverHomingData(); data.TargetNetID = reader.ReadUInt32(); data.TargetHeightModifier = reader.ReadFloat(); data.TargetPosition = reader.ReadVector3(); data.Speed = reader.ReadFloat(); data.Gravity = reader.ReadFloat(); data.RateOfTurn = reader.ReadFloat(); data.Duration = reader.ReadFloat(); data.MovementPropertyFlags = reader.ReadUInt32(); return(data); }