1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-15 06:17:38 +00:00

determinePush now accepts movei instead of c

This commit is contained in:
Zeno Rogue
2021-05-29 15:44:07 +02:00
parent b0333a6ab7
commit d7e2b491ac
5 changed files with 16 additions and 11 deletions

View File

@@ -1123,7 +1123,7 @@ void movePlayer(monster *m, int delta) {
if(d<bestd) bestd=d, subdir = di;
}
pushmonsters();
auto mip = determinePush(cellwalker(c2, sd1)+wstep, subdir, [m, c2] (cell *c) { return canPushThumperOn(c, c2, m->base); });
auto mip = determinePush(cellwalker(c2, sd1)+wstep, subdir, [m, c2] (movei mi) { return canPushThumperOn(mi, m->base); });
visibleFor(300);
if(!mip.proper()) go = false;
else pushThumper(mip);