From a041016446a3d62106cc6a1d0de8b6afe84df4db Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 10 Jun 2023 11:07:49 +0200 Subject: [PATCH] CLI -center-vertex to center on vertex; still needs i=2 to rotate the camera --- commandline.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/commandline.cpp b/commandline.cpp index 84bece5c..cc664a61 100644 --- a/commandline.cpp +++ b/commandline.cpp @@ -303,6 +303,22 @@ int arg::readCommon() { shift(); rotate_view(cspin(i, j, argf())); playermoved = false; } + else if(argis("-center-vertex")) { + PHASE(3); shift(); int i = argi(); + shift(); int j = argi(); + shift(); int k = argi(); + start_game(); + auto fh = currentmap->get_cellshape(cwt.at).faces[j][k]; + hyperpoint h = View * fh; + if(i == 0) { + shift_view_to(shiftless(h)); + playermoved = false; + } + if(i == 1) { + rotate_view(spintox(h)); + rotate_view(cspin90(0, 2)); + } + } else if(argis("-cview")) { PHASE(3); start_game(); View = Id; playermoved = false;