1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

fixed discrepancy in last

This commit is contained in:
Zeno Rogue 2020-07-28 18:09:26 +02:00
parent b6872b66a1
commit 6e0de94ff1

View File

@ -1511,8 +1511,9 @@ namespace mapeditor {
shiftpoint in_front_dist(ld d) {
double mx = current_display->tanfov * (mousex - current_display->xcenter)/current_display->radius;
double my = current_display->tanfov * (mousey - current_display->ycenter)/current_display->radius/pconf.stretch;
ld ys = current_display->xsize/2;
double mx = current_display->tanfov * (mousex - current_display->xcenter)/ys;
double my = current_display->tanfov * (mousey - current_display->ycenter)/ys/pconf.stretch;
hyperpoint tgt = point3(mx, my, 1);
tgt *= d / hypot_d(3, tgt);