1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-13 17:06:52 +00:00

commandline rotate commands set playermoved=false

This commit is contained in:
Zeno Rogue 2022-09-24 09:10:32 +02:00
parent 62fed6129f
commit f33d169fe1

View File

@ -256,22 +256,26 @@ int arg::readCommon() {
shift(); ld a = argf(); shift(); ld a = argf();
shift(); ld b = argf(); shift(); ld b = argf();
View = View * spin(M_PI * 2 * a / b); View = View * spin(M_PI * 2 * a / b);
playermoved = false;
} }
else if(argis("-rotate-up")) { else if(argis("-rotate-up")) {
start_game(); start_game();
shiftmatrix S = ggmatrix(cwt.at->master->move(0)->c7); shiftmatrix S = ggmatrix(cwt.at->master->move(0)->c7);
View = spin(90*degree) * spintox(S.T*C0) * View; View = spin(90*degree) * spintox(S.T*C0) * View;
playermoved = false;
} }
else if(argis("-rotate3")) { else if(argis("-rotate3")) {
PHASE(3); start_game(); PHASE(3); start_game();
shift(); ld a = argf(); shift(); ld a = argf();
shift(); ld b = argf(); shift(); ld b = argf();
View = View * cspin(1, 2, M_PI * 2 * a / b); View = View * cspin(1, 2, M_PI * 2 * a / b);
playermoved = false;
} }
else if(argis("-face-vertex")) { else if(argis("-face-vertex")) {
PHASE(3); start_game(); PHASE(3); start_game();
auto &ss = currentmap->get_cellshape(cwt.at); auto &ss = currentmap->get_cellshape(cwt.at);
View = cspin(0, 2, M_PI/2) * spintox(ss.vertices_only_local[0]); View = cspin(0, 2, M_PI/2) * spintox(ss.vertices_only_local[0]);
playermoved = false;
} }
else if(argis("-face-face")) { else if(argis("-face-face")) {
PHASE(3); start_game(); PHASE(3); start_game();
@ -282,6 +286,7 @@ int arg::readCommon() {
shift(); int i = argi(); shift(); int i = argi();
shift(); int j = argi(); shift(); int j = argi();
shift(); View = View * cspin(i, j, argf()); shift(); View = View * cspin(i, j, argf());
playermoved = false;
} }
else if(argis("-cview")) { else if(argis("-cview")) {
PHASE(3); start_game(); PHASE(3); start_game();