1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

fixed crash in (i)ddspin: move to cmove

This commit is contained in:
Zeno Rogue 2019-07-28 11:40:15 +02:00
parent d60de0306b
commit 5a0d84683a

View File

@ -364,13 +364,13 @@ double hexshiftat(cell *c) {
} }
transmatrix ddspin(cell *c, int d, ld bonus) { transmatrix ddspin(cell *c, int d, ld bonus) {
if(WDIM == 3 && d < c->type) return rspintox(tC0(calc_relative_matrix(c->move(d), c, C0))) * cspin(2, 0, bonus); if(WDIM == 3 && d < c->type) return rspintox(tC0(calc_relative_matrix(c->cmove(d), c, C0))) * cspin(2, 0, bonus);
if(WDIM == 2 && (binarytiling || penrose)) return spin(bonus) * rspintox(nearcorner(c, d)); if(WDIM == 2 && (binarytiling || penrose)) return spin(bonus) * rspintox(nearcorner(c, d));
return spin(displayspin(c, d) + bonus - hexshiftat(c)); return spin(displayspin(c, d) + bonus - hexshiftat(c));
} }
transmatrix iddspin(cell *c, int d, ld bonus) { transmatrix iddspin(cell *c, int d, ld bonus) {
if(WDIM == 3 && d < c->type) return cspin(0, 2, bonus) * spintox(tC0(calc_relative_matrix(c->move(d), c, C0))); if(WDIM == 3 && d < c->type) return cspin(0, 2, bonus) * spintox(tC0(calc_relative_matrix(c->cmove(d), c, C0)));
if(WDIM == 2 && (binarytiling || penrose)) return spin(bonus) * spintox(nearcorner(c, d)); if(WDIM == 2 && (binarytiling || penrose)) return spin(bonus) * spintox(nearcorner(c, d));
return spin(hexshiftat(c) - displayspin(c, d) + bonus); return spin(hexshiftat(c) - displayspin(c, d) + bonus);
} }