1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-08 07:00:10 +00:00

fixup to intra editing (point_direction was missing)

This commit is contained in:
Zeno Rogue 2021-09-18 01:39:30 +02:00
parent 96c143da8e
commit 3ece943c9f

View File

@ -4849,17 +4849,20 @@ EX shiftmatrix cview(ld base_shift IS(0)) {
return shiftless(actual_view_transform * View, base_shift); return shiftless(actual_view_transform * View, base_shift);
} }
EX int point_direction;
EX void precise_mouseover() { EX void precise_mouseover() {
if(WDIM == 3) { if(WDIM == 3) {
mouseover2 = mouseover = centerover; mouseover2 = mouseover = centerover;
ld best = HUGE_VAL; ld best = HUGE_VAL;
shiftpoint h = shiftless(direct_exp(lp_iapply(ztangent(0.01)))); shiftpoint h = shiftless(direct_exp(lp_iapply(ztangent(0.01))));
point_direction = -1;
shiftmatrix cov = ggmatrix(mouseover2); shiftmatrix cov = ggmatrix(mouseover2);
forCellIdEx(c1, i, mouseover2) { forCellIdEx(c1, i, mouseover2) {
shiftpoint h1 = tC0(cov * currentmap->adj(mouseover2, i)); shiftpoint h1 = tC0(cov * currentmap->adj(mouseover2, i));
ld dist = geo_dist(h, h1) - geo_dist(shiftless(C0), h1); ld dist = geo_dist(h, h1) - geo_dist(shiftless(C0), h1);
if(dist < best) mouseover = c1, best = dist; if(dist < best) mouseover = c1, best = dist, point_direction = i;
} }
return; return;
} }