1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-12 11:43:01 +00:00

nilrider:: nlrOrder flag to order the triangles correctly

This commit is contained in:
Zeno Rogue
2022-05-03 22:06:21 +02:00
parent 0e3e3b9042
commit b3e29d9e03
3 changed files with 14 additions and 2 deletions

View File

@@ -247,6 +247,13 @@ void level::init() {
// println(hlog, shFloor[i].s, " to ", shFloor[i].e);
}
if(flags & nrlOrder) {
sort(triangles.begin(), triangles.end(), [this] (triangledata a, triangledata b) {
return atan2(spin(120*degree)*(a.where - start.where)) < atan2(spin(120*degree)*(b.where - start.where));
});
for(auto t: triangles) println(hlog, t.where);
}
cgi.extra_vertices();
init_plan();
}