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

fixed camera not rotating in Nil shmup

This commit is contained in:
Zeno Rogue 2020-11-14 14:43:14 +01:00
parent c9fc591e9d
commit bc102b000d

View File

@ -1653,7 +1653,11 @@ EX void centerpc(ld aspd) {
transmatrix T = pc->at; transmatrix T = pc->at;
int sl = snakelevel(cwt.at); int sl = snakelevel(cwt.at);
if((sl || vid.eye) && WDIM == 2) T = T * zpush(cgi.SLEV[sl] - cgi.FLOOR + vid.eye); if((sl || vid.eye) && WDIM == 2) T = T * zpush(cgi.SLEV[sl] - cgi.FLOOR + vid.eye);
View = iso_inverse(T); /* in nonisotropic geometries, T is isometry * rotation, so iso_inverse does not work */
if(nonisotropic)
View = inverse(T);
else
View = iso_inverse(T);
if(prod) NLP = ortho_inverse(pc->ori); if(prod) NLP = ortho_inverse(pc->ori);
if(WDIM == 2) rotate_view( cspin(0, 1, M_PI) * cspin(2, 1, M_PI/2 + shmup::playerturny[id]) * spin(-M_PI/2) ); if(WDIM == 2) rotate_view( cspin(0, 1, M_PI) * cspin(2, 1, M_PI/2 + shmup::playerturny[id]) * spin(-M_PI/2) );
return; return;