mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-19 13:43:04 +00:00
mobile:: rotating rug via orientation works again, and using rotate_view
This commit is contained in:
parent
6e4b2c281f
commit
b37ad3d8a8
@ -185,14 +185,14 @@ void apply_orientation() {
|
|||||||
main_last_orientation = T;
|
main_last_orientation = T;
|
||||||
else {
|
else {
|
||||||
transmatrix next_orientation = T;
|
transmatrix next_orientation = T;
|
||||||
View = main_last_orientation * View;
|
rotate_view(main_last_orientation);
|
||||||
if(WDIM == 2 && vid.fixed_yz) {
|
if(WDIM == 2 && vid.fixed_yz) {
|
||||||
if(View[0][2] || View[1][2] || View[2][2]) {
|
if(View[0][2] || View[1][2] || View[2][2]) {
|
||||||
View = cspin(0, 2, -atan2(View[0][2], View[2][2])) * View;
|
View = cspin(0, 2, -atan2(View[0][2], View[2][2])) * View;
|
||||||
View = cspin(1, 2, -atan2(View[1][2], View[2][2])) * View;
|
View = cspin(1, 2, -atan2(View[1][2], View[2][2])) * View;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
View = inverse(next_orientation) * View;
|
rotate_view(inverse(next_orientation));
|
||||||
main_last_orientation = next_orientation;
|
main_last_orientation = next_orientation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -212,6 +212,11 @@ EX void mobile_draw(MOBPAR_FORMAL) {
|
|||||||
if(GDIM == 3 && !shmup::on && !rug::rugged)
|
if(GDIM == 3 && !shmup::on && !rug::rugged)
|
||||||
apply_orientation();
|
apply_orientation();
|
||||||
|
|
||||||
|
if(rug::rugged) {
|
||||||
|
rug::using_rugview urv;
|
||||||
|
apply_orientation();
|
||||||
|
}
|
||||||
|
|
||||||
if(playermoved && vid.sspeed > -4.99)
|
if(playermoved && vid.sspeed > -4.99)
|
||||||
centerpc(tdiff / 1000.0 * exp(vid.sspeed));
|
centerpc(tdiff / 1000.0 * exp(vid.sspeed));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user