public virtual Entity ent42ToEntM510(Entity inputData) { if (inputData.BrushBased) { Vector3D origin = inputData.Origin; inputData.Attributes.Remove("origin"); inputData.Attributes.Remove("model"); if ((origin[0] != 0 || origin[1] != 0 || origin[2] != 0) && !Settings.noOriginBrushes) { // If this brush uses the "origin" attribute MAPBrush newOriginBrush = MAPBrush.createBrush(new Vector3D(-Settings.originBrushSize, -Settings.originBrushSize, -Settings.originBrushSize), new Vector3D(Settings.originBrushSize, Settings.originBrushSize, Settings.originBrushSize), "special/origin"); inputData.Brushes.Add(newOriginBrush); } for (int i = 0; i < inputData.Brushes.Count; i++) { MAPBrush currentBrush = inputData.Brushes[i]; currentBrush.translate(new Vector3D(origin)); } } return(inputData); }