mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
fixed precise_mouseover for hybrid (something weird there?) and confusing spaces
This commit is contained in:
parent
49460ba379
commit
415922ff1b
18
graph.cpp
18
graph.cpp
@ -4293,21 +4293,9 @@ EX void precise_mouseover() {
|
|||||||
ld best = HUGE_VAL;
|
ld best = HUGE_VAL;
|
||||||
hyperpoint h = direct_exp(lp_iapply(ztangent(0.01)), 100);
|
hyperpoint h = direct_exp(lp_iapply(ztangent(0.01)), 100);
|
||||||
|
|
||||||
if(hybri) {
|
transmatrix cov = ggmatrix(mouseover2);
|
||||||
while(true) {
|
forCellIdEx(c1, i, mouseover2) {
|
||||||
ld d1 = geo_dist(C0, tC0(ggmatrix(mouseover2)), iTable);
|
hyperpoint h1 = tC0(cov * currentmap->adj(mouseover2, i));
|
||||||
cell *nxt = NULL;
|
|
||||||
forCellEx(c1, mouseover2) {
|
|
||||||
ld d2 = geo_dist(C0, tC0(ggmatrix(c1)), iTable);
|
|
||||||
if(d2 < d1) d1 = d2, nxt = c1;
|
|
||||||
}
|
|
||||||
if(!nxt) break;
|
|
||||||
mouseover2 = nxt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
forCellEx(c1, mouseover2) {
|
|
||||||
hyperpoint h1 = tC0(ggmatrix(c1));
|
|
||||||
ld dist = geo_dist(h1, h, iTable) - geo_dist(C0, h1, iTable);
|
ld dist = geo_dist(h1, h, iTable) - geo_dist(C0, h1, iTable);
|
||||||
if(dist < best) mouseover = c1, best = dist;
|
if(dist < best) mouseover = c1, best = dist;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user