From 9f6f3232b5acbd93ee281dd40f92df6bb3f6766e Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 14 Nov 2019 00:43:36 +0100 Subject: [PATCH] the orientation after recentering is now always 'player facing upwards' --- graph.cpp | 3 +-- hypgraph.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/graph.cpp b/graph.cpp index c60758af..e8e713be 100644 --- a/graph.cpp +++ b/graph.cpp @@ -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); } } diff --git a/hypgraph.cpp b/hypgraph.cpp index 64293d06..e22f2671 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -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);