1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

the orientation after recentering is now always 'player facing upwards'

This commit is contained in:
Zeno Rogue 2019-11-14 00:43:36 +01:00
parent 1e6d221e0a
commit 9f6f3232b5
2 changed files with 10 additions and 4 deletions

View File

@ -5014,10 +5014,9 @@ EX void drawscreen() {
EX void restartGraph() {
DEBBI(DF_INIT, ("restartGraph"));
View = Id;
if(!autocheat) linepatterns::clearAll();
if(currentmap) {
centerover = currentmap->gamestart();
resetview();
if(sphere) View = spin(-M_PI/2);
}
}

View File

@ -1473,9 +1473,16 @@ void ballgeometry() {
EX void resetview() {
DEBBI(DF_GRAPH, ("reset view"));
View = models::rotmatrix();
// EUCLIDEAN
centerover = cwt.at;
if(cwt.at) {
centerover = cwt.at;
View = iddspin(cwt.at, cwt.spin, M_PI + vid.fixed_facing_dir * degree);
if(cwt.mirrored) View = Mirror * View;
}
else if(currentmap) {
centerover = currentmap->gamestart();
View = Id;
}
cwtV = View;
nisot::local_perspective = Id;
// SDL_LockSurface(s);