Skip to content

Commit bbd154b

Browse files
committed
rogueviz::seuphorica::fix visual spam for portals in confusing spaces
1 parent 2236039 commit bbd154b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rogueviz/seuphorica.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,13 @@ bool draw(cell *c, const shiftmatrix& V) {
572572
wider w(3);
573573
auto cw = tile_orientation[c];
574574
auto cw1 = tile_orientation[c1];
575-
for(const shiftmatrix& V1: hr::span_at(current_display->all_drawn_copies, c1)) {
575+
shiftmatrix V1; ld bestd = HUGE_VAL;
576+
for(auto& cV1: hr::span_at(current_display->all_drawn_copies, c1)) {
577+
ld d = hdist(cV1*tile_center(), V*tile_center());
578+
if(d < bestd) bestd = d, V1 = cV1;
579+
}
576580

581+
if(bestd < HUGE_VAL) {
577582
auto pt0 = [&] (cellwalker cw, int id, ld r = 4) {
578583
r /= gigscale;
579584
return currentmap->get_corner(cw.at, (cw+id+(cw.mirrored?0:1)+c->type/2).spin, r);

0 commit comments

Comments
 (0)