public static void Serialize(Stream bytes, Vector3Old instance) { bytes.Write(BitConverter.GetBytes((short)MathUtils.Clamp(instance.x * 100f, -32768f, 32767f)), 0, 2); bytes.Write(BitConverter.GetBytes((short)MathUtils.Clamp(instance.y * 100f, -32768f, 32767f)), 0, 2); bytes.Write(BitConverter.GetBytes((short)MathUtils.Clamp(instance.z * 100f, -32768f, 32767f)), 0, 2); }
public static void Serialize(Stream bytes, Vector3Old instance) { bytes.Write(BitConverter.GetBytes(instance.x), 0, 4); bytes.Write(BitConverter.GetBytes(instance.y), 0, 4); bytes.Write(BitConverter.GetBytes(instance.z), 0, 4); }
public SpawnPoint(Vector3Old position, byte rotation) { Position = position; Rotation = rotation; }