Don't look up shared nodes that are already necessary

Vertices that are already going to be kept, because they begin a ring
or are on the tile boundary, can't be affected by whether they are also
global shared nodes, so skip looking them up. These are most of the
vertices that clipping creates, which don't know their node state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P2nBqZisxNQfmEmon3vE9v
This commit is contained in:
Claude
2026-09-23 18:09:52 +00:00
parent d3a98170bf
commit ee5debc4f2
+4 -1
View File
@@ -298,7 +298,10 @@ drawvec simplify_lines(drawvec &geom, int z, int tx, int ty, int detail, bool ma
geom[i].necessary = true;
}
if (shared_nodes_map != NULL && nodepos > 0) {
// A vertex that is already necessary, because it is the start of a ring
// or on the tile boundary, doesn't need to be looked up, since the answer
// could only make it necessary again.
if (shared_nodes_map != NULL && nodepos > 0 && !geom[i].necessary) {
if (geom[i].node == NODE_UNKNOWN) {
// offset to global
long long wx = geom[i].x;