mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-17 15:17:37 +00:00
fixed fix_the_band when changing model_orientation
This commit is contained in:
@@ -1864,9 +1864,9 @@ EX void draw_boundary(int w) {
|
|||||||
EX ld band_shift = 0;
|
EX ld band_shift = 0;
|
||||||
EX void fix_the_band(transmatrix& T) {
|
EX void fix_the_band(transmatrix& T) {
|
||||||
if(((mdinf[pmodel].flags & mf::uses_bandshift) && T[LDIM][LDIM] > 1e6) || (sphere && pmodel == mdSpiral)) {
|
if(((mdinf[pmodel].flags & mf::uses_bandshift) && T[LDIM][LDIM] > 1e6) || (sphere && pmodel == mdSpiral)) {
|
||||||
|
T = spin(models::model_orientation * degree) * T;
|
||||||
hyperpoint H = tC0(T);
|
hyperpoint H = tC0(T);
|
||||||
find_zlev(H);
|
find_zlev(H);
|
||||||
models::apply_orientation(H[0], H[1]);
|
|
||||||
|
|
||||||
ld y = asin_auto(H[1]);
|
ld y = asin_auto(H[1]);
|
||||||
ld x = asin_auto_clamp(H[0] / cos_auto(y));
|
ld x = asin_auto_clamp(H[0] / cos_auto(y));
|
||||||
@@ -1877,7 +1877,7 @@ EX void fix_the_band(transmatrix& T) {
|
|||||||
band_shift += x;
|
band_shift += x;
|
||||||
T = xpush(-x) * T;
|
T = xpush(-x) * T;
|
||||||
fixmatrix(T);
|
fixmatrix(T);
|
||||||
// todo orientation
|
T = spin(-models::model_orientation * degree) * T;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user