summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3b5fc2b)
raw | patch | inline | side by side (parent: 3b5fc2b)
author | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Mon, 4 Sep 2023 09:38:47 +0000 (19:38 +1000) | ||
committer | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Mon, 4 Sep 2023 09:38:47 +0000 (19:38 +1000) |
The minimum X and Y coordinates may belong to different objects, which I didn't take into account.
src/editor/f_main.pas | patch | blob | history |
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 2df86ca6f40543ca72fe14c0d0ce5e2d911f3ad1..aaa201e5ecda20472d09a9f38b9ffcfa443d26c5 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
if h > 0 then
begin
- xadj := -pmin.X - Floor((MapOffset.X - 32) / DotStep) * DotStep;
- yadj := -pmin.Y - Floor((MapOffset.Y - 32) / DotStep) * DotStep;
+ xadj := Floor((-pmin.X - MapOffset.X + 32) / DotStep) * DotStep;
+ yadj := Floor((-pmin.Y - MapOffset.Y + 32) / DotStep) * DotStep;
end
else
begin