1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-20 11:54:48 +00:00

fixed a reverse_direction crash in kd2

This commit is contained in:
Zeno Rogue 2021-03-06 11:07:54 +01:00
parent c8cb6ef230
commit 032a6b6df2

View File

@ -1307,7 +1307,7 @@ EX vector<cell*> adj_minefield_cells(cell *c) {
}
EX vector<int> reverse_directions(cell *c, int dir) {
if(PURE) return reverse_directions(c->master, dir);
if(PURE && !(kite::in() && WDIM == 2)) return reverse_directions(c->master, dir);
int d = c->degree();
if(d & 1)
return { gmod(dir + c->type/2, c->type), gmod(dir + (c->type+1)/2, c->type) };