From 360f95ce4304bbdc6121bc58aa63a807d0c325d0 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 9 May 2019 21:55:17 +0200 Subject: [PATCH] 2d3d:: adjusted shmup to reversed Z --- hypgraph.cpp | 2 +- shmup.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hypgraph.cpp b/hypgraph.cpp index 808b655f..2091c657 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -1100,7 +1100,7 @@ void centerpc(ld aspd) { else View = inverse(T); if(vid.yshift) View = cpush(2, wall_radar(viewctr.at->c7, T)) * View; - if(WDIM == 2) View = cspin(2, 1, M_PI/2 + shmup::playerturny[id]) * spin(-M_PI/2) * View; + if(WDIM == 2) View = cspin(0, 1, M_PI) * cspin(2, 1, M_PI/2 + shmup::playerturny[id]) * spin(-M_PI/2) * View; #if CAP_RACING if(racing::on) racing::set_view(); diff --git a/shmup.cpp b/shmup.cpp index d92febb4..0ac09f9e 100644 --- a/shmup.cpp +++ b/shmup.cpp @@ -1652,7 +1652,7 @@ void movePlayer(monster *m, int delta) { if(WDIM == 2 && GDIM == 3) { double mdd = hypot(mdx, mdy); - godir[cpid] = atan2(mdx, -mdy); + godir[cpid] = -atan2(mdx, -mdy); mgo += mdd; } @@ -1687,8 +1687,8 @@ void movePlayer(monster *m, int delta) { bool blown = m->blowoff > curtime; if(WDIM == 2 && GDIM == 3 && !lctrlclick && cpid == 0 && !racing::on) { - playerturn[cpid] += mouseaim_x; - playerturny[cpid] += mouseaim_y; + playerturn[cpid] -= mouseaim_x; + playerturny[cpid] -= mouseaim_y; mouseaim_x = 0; mouseaim_y = 0; }