1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-28 11:00:34 +00:00

optimize center in queue

This commit is contained in:
Zeno Rogue 2022-09-18 17:28:48 +02:00
parent 43305ea1cd
commit a1a65ac612

View File

@ -18,14 +18,8 @@ void draw_game_cell(cell *c, ads_matrix V, ld plev) {
hyperpoint ha = hybrid::get_corner(c, i, 2, 0);
hlist.push_back(findflat(V * ha));
}
center = findflat(V * C0);
});
if(1) {
ld d = hdist0(center.h);
if(d < vctr_dist) vctr_dist = d, new_vctr = c, new_vctrV = V;
}
auto& ci = ci_at[c];
if(ci.mpd_terrain > 0) {
if(!gen_budget) return;
@ -249,7 +243,11 @@ void view_ads_game() {
adjust_to_zero(V1, g, plev);
auto center = findflat(V1 * C0);
visit(-hdist0(center.h), g.first, V1);
center = findflat(V * C0);
ld d = hdist0(center.h);
if(d < vctr_dist) vctr_dist = d, new_vctr = c, new_vctrV = V;
visit(-d, g.first, V1);
}
});
}