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

get_valence now can use the information from arb

This commit is contained in:
Zeno Rogue 2022-04-23 00:40:08 +02:00
parent 3f8e9dde2b
commit 1acf4fa477

View File

@ -72,6 +72,14 @@ EX bool warped_version(eLand l1, eLand l2) {
} }
EX int get_valence(cellwalker bb, int dir, bool& ok) { EX int get_valence(cellwalker bb, int dir, bool& ok) {
if(arb::in()) {
auto& sh = arb::current_or_slided().shapes[arb::id_of(bb.at->master)];
if(bb.mirrored) dir = -dir;
if(dir == 1)
return sh.vertex_valence[bb.spin];
else
return sh.vertex_valence[gmod(bb.spin - 1, bb.at->type)];
}
int steps = 0; int steps = 0;
cellwalker bb1 = bb; cellwalker bb1 = bb;
while(bb1 != bb || !steps) { while(bb1 != bb || !steps) {