mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-02 16:29:54 +00:00
better centering in cheatmode
This commit is contained in:
parent
5cbe61a823
commit
ea55f43abf
@ -1431,6 +1431,7 @@ EX void resetview() {
|
|||||||
DEBBI(DF_GRAPH, ("reset view"));
|
DEBBI(DF_GRAPH, ("reset view"));
|
||||||
// EUCLIDEAN
|
// EUCLIDEAN
|
||||||
NLP = Id;
|
NLP = Id;
|
||||||
|
auto lView = View;
|
||||||
if(cwt.at) {
|
if(cwt.at) {
|
||||||
centerover = cwt.at;
|
centerover = cwt.at;
|
||||||
View = iddspin(cwt.at, cwt.spin);
|
View = iddspin(cwt.at, cwt.spin);
|
||||||
@ -1439,6 +1440,14 @@ EX void resetview() {
|
|||||||
if(GDIM == 2) View = spin(M_PI + vid.fixed_facing_dir * degree) * View;
|
if(GDIM == 2) View = spin(M_PI + vid.fixed_facing_dir * degree) * View;
|
||||||
if(GDIM == 3 && !prod) View = cspin(0, 2, M_PI/2) * View;
|
if(GDIM == 3 && !prod) View = cspin(0, 2, M_PI/2) * View;
|
||||||
if(prod) NLP = cspin(0, 2, M_PI/2);
|
if(prod) NLP = cspin(0, 2, M_PI/2);
|
||||||
|
if(cheater && eqmatrix(View, lView)) {
|
||||||
|
View = Id;
|
||||||
|
static ld cyc = 0;
|
||||||
|
cyc += 90 * degree;
|
||||||
|
View = spin(cyc) * View;
|
||||||
|
if(GDIM == 2) View = spin(M_PI + vid.fixed_facing_dir * degree) * View;
|
||||||
|
if(GDIM == 3 && !prod) View = cspin(0, 2, M_PI/2) * View;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(currentmap) {
|
else if(currentmap) {
|
||||||
centerover = currentmap->gamestart();
|
centerover = currentmap->gamestart();
|
||||||
|
Loading…
Reference in New Issue
Block a user