mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-09 12:16:45 +00:00
rulegen3:: faster get_parent_dir
This commit is contained in:
parent
7f0bbcfef3
commit
fe7b54d256
10
rulegen.cpp
10
rulegen.cpp
@ -941,6 +941,16 @@ EX twalker get_parent_dir(twalker& cw) {
|
||||
|
||||
be_solid(c);
|
||||
|
||||
if(WDIM == 3) {
|
||||
for(int i=0; i<c->type; i++) {
|
||||
tcell *c1 = c->cmove(i);
|
||||
if(c1->dist < c->dist) {
|
||||
c->parent_dir = i;
|
||||
return twalker(c, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto oc = c;
|
||||
|
||||
if(c->dist > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user