Linedefs Mode: fixed an issue where aligning flats to lines through the "Linedefs" menu would round the offsets to whole numbers. Now it rounds to 6 decimal places, which is in line with aligning flats in Visual Mode

This commit is contained in:
biwa 2024-01-12 14:14:38 +01:00
parent d5a6d7f242
commit 77ed089917

View file

@ -284,8 +284,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
offset.y %= texture.Height / s.Fields.GetValue((alignFloors ? "yscalefloor" : "yscaleceiling"), 1.0);
}
UniFields.SetFloat(s.Fields, (alignFloors ? "xpanningfloor" : "xpanningceiling"), Math.Round(-offset.x), 0.0);
UniFields.SetFloat(s.Fields, (alignFloors ? "ypanningfloor" : "ypanningceiling"), Math.Round(offset.y), 0.0);
UniFields.SetFloat(s.Fields, (alignFloors ? "xpanningfloor" : "xpanningceiling"), Math.Round(-offset.x, 6), 0.0);
UniFields.SetFloat(s.Fields, (alignFloors ? "ypanningfloor" : "ypanningceiling"), Math.Round(offset.y, 6), 0.0);
//update
s.UpdateNeeded = true;