mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-19 11:44:48 +00:00
get_valence now can use the information from arb
This commit is contained in:
parent
3f8e9dde2b
commit
1acf4fa477
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user