mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-08 03:36:43 +00:00
check_orientation fixup
This commit is contained in:
parent
f432cccbe3
commit
68207b7a23
@ -80,13 +80,14 @@ void check_orientation(cell *c) {
|
||||
if(tile_orientation_level[c1] > maxlev)
|
||||
maxlev = tile_orientation_level[c1], dir = i;
|
||||
}
|
||||
if(maxlev == 0) return;
|
||||
tile_orientation_level[c] = maxlev - 1;
|
||||
auto c1 = c->cmove(dir);
|
||||
cellwalker cw = tile_orientation[c1];
|
||||
int steps = 0;
|
||||
while(cw.spin != c->c.spin(dir)) { cw--; steps++; }
|
||||
cw += wstep; cw += rev;
|
||||
if(!anyshiftclick) while(steps) { cw++; steps--; }
|
||||
while(steps) { cw++; steps--; }
|
||||
tile_orientation[c] = cw;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user