From e6b5a333ba60239c89a7172a5fab8c8da89d7374 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 8 Mar 2020 00:02:00 +0100 Subject: [PATCH] fixed pushing in shmup --- shmup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shmup.cpp b/shmup.cpp index ebde13be..0d422d19 100644 --- a/shmup.cpp +++ b/shmup.cpp @@ -1069,7 +1069,7 @@ void movePlayer(monster *m, int delta) { } } else if(isPushable(c2->wall) && !nonAdjacent(c2, m->base)) { - int sd1 = neighborId(m->base, c2); + int sd1 = neighborId(c2, m->base); int sd = m->base->c.spin(sd1); int subdir = 1; double bestd = 9999; @@ -1081,7 +1081,7 @@ void movePlayer(monster *m, int delta) { if(dbase); }); + auto mip = determinePush(cellwalker(c2, sd1)+wstep, subdir, [m, c2] (cell *c) { return canPushThumperOn(c, c2, m->base); }); visibleFor(300); if(!mip.proper()) go = false; else pushThumper(mip);