1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

fixed unused capture warnings

This commit is contained in:
Zeno Rogue 2021-06-03 15:11:24 +02:00
parent fde3977218
commit 982377c26c
4 changed files with 6 additions and 6 deletions

View File

@ -1275,7 +1275,7 @@ EX namespace dice {
base_to_base = -h[2]; base_to_base = -h[2];
else { else {
ld lim = sphere ? 1 : 5; ld lim = sphere ? 1 : 5;
base_to_base = binsearch(-lim, lim, [h, osphere] (ld d) { base_to_base = binsearch(-lim, lim, [h] (ld d) {
return (zpush(d) * h)[2] >= sin_auto(vid.depth); return (zpush(d) * h)[2] >= sin_auto(vid.depth);
}); });
} }

View File

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

View File

@ -630,7 +630,7 @@ bool pcmove::actual_move() {
} }
if(c2->monst == moAnimatedDie) { if(c2->monst == moAnimatedDie) {
mip = determinePush(cwt, subdir, [c2] (movei mi) { return canPushThumperOn(mi, cwt.at); }); mip = determinePush(cwt, subdir, [] (movei mi) { return canPushThumperOn(mi, cwt.at); });
if(mip.proper()) { if(mip.proper()) {
auto tgt = roll_effect(mip, dice::data[c2]); auto tgt = roll_effect(mip, dice::data[c2]);
if(tgt.happy() > 0) { if(tgt.happy() > 0) {
@ -642,7 +642,7 @@ bool pcmove::actual_move() {
} }
if(isPushable(c2->wall) && !c2->monst && !nonAdjacentPlayer(c2, cwt.at) && fmsMove) { if(isPushable(c2->wall) && !c2->monst && !nonAdjacentPlayer(c2, cwt.at) && fmsMove) {
mip = determinePush(cwt, subdir, [c2] (movei mi) { return canPushThumperOn(mi, cwt.at); }); mip = determinePush(cwt, subdir, [] (movei mi) { return canPushThumperOn(mi, cwt.at); });
if(mip.t) changes.ccell(mip.t); if(mip.t) changes.ccell(mip.t);
if(mip.d == NO_SPACE) { if(mip.d == NO_SPACE) {
if(vmsg(miWALL)) addMessage(XLAT("No room to push %the1.", c2->wall)); if(vmsg(miWALL)) addMessage(XLAT("No room to push %the1.", c2->wall));
@ -980,7 +980,7 @@ bool pcmove::attack() {
if(items[itCurseWeakness] || (isStunnable(c2->monst) && c2->hitpoints > 1)) { if(items[itCurseWeakness] || (isStunnable(c2->monst) && c2->hitpoints > 1)) {
if(monsterPushable(c2)) if(monsterPushable(c2))
mip = determinePush(cwt, subdir, [c2] (movei mi) { return passable(mi.t, mi.s, P_BLOW); }); mip = determinePush(cwt, subdir, [] (movei mi) { return passable(mi.t, mi.s, P_BLOW); });
else else
mip.t = c2; mip.t = c2;
if(mip.t) changes.ccell(mip.t); if(mip.t) changes.ccell(mip.t);

View File

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