mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
ORS improvement
This commit is contained in:
parent
a7e1418ffd
commit
aec019a29b
10
control.cpp
10
control.cpp
@ -1078,7 +1078,7 @@ string choices[3] = {"OFF", "relative", "absolute"};
|
|||||||
|
|
||||||
#if CAP_ORIENTATION
|
#if CAP_ORIENTATION
|
||||||
transmatrix getOrientation() {
|
transmatrix getOrientation() {
|
||||||
return MirrorX * MirrorZ * hr::getOrientation() * MirrorX * MirrorZ;
|
return MirrorX * hr::getOrientation() * MirrorX;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1186,10 +1186,16 @@ void rerotate(transmatrix& T) {
|
|||||||
if(mode == 1) T = (relative_matrix) * T;
|
if(mode == 1) T = (relative_matrix) * T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int first_check, last_check;
|
||||||
|
|
||||||
void check_orientation() {
|
void check_orientation() {
|
||||||
#if CAP_ORIENTATION
|
#if CAP_ORIENTATION
|
||||||
if(!mode) return;
|
if(!mode) return;
|
||||||
if(ticks < when_enabled + 500) {
|
|
||||||
|
if(ticks > last_check + 2000) first_check = ticks;
|
||||||
|
last_check = ticks;
|
||||||
|
|
||||||
|
if(ticks < first_check + 500) {
|
||||||
last_orientation = getOrientation();
|
last_orientation = getOrientation();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user