1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-28 12:27:40 +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

@@ -655,7 +655,7 @@ EX void beastAttack(cell *c, bool player, bool targetdir) {
if(c2->monst && c2->stuntime) {
cellwalker bull (c, d);
int subdir = determinizeBullPush(bull);
auto mi = determinePush(bull, subdir, [c2] (cell *c) { return passable(c, c2, P_BLOW); });
auto mi = determinePush(bull, subdir, [c2] (movei mi) { return passable(mi.t, c2, P_BLOW); });
if(mi.proper())
pushMonster(mi);
}
@@ -672,7 +672,7 @@ EX void beastAttack(cell *c, bool player, bool targetdir) {
if(c2->wall == waThumperOn) {
cellwalker bull (c, d);
int subdir = determinizeBullPush(bull);
auto mi = determinePush(bull, subdir, [c2] (cell *c) { return canPushThumperOn(c, c2, c); });
auto mi = determinePush(bull, subdir, [c, c2] (movei mi) { return canPushThumperOn(mi, c); });
if(mi.proper())
pushThumper(mi);
}