movei from cellwalker, old empathyMove removed

This commit is contained in:
Zeno Rogue 2019-11-22 18:12:50 +01:00
parent 6d44105fef
commit 9521b622e1
4 changed files with 4 additions and 7 deletions

View File

@ -1385,9 +1385,9 @@ EX namespace mirror {
continue; continue;
} }
c->monst = moMimic; c->monst = moMimic;
moveMonster(c2, c, m.second.spin); moveMonster(m.second);
c2->monst = moNone; c2->monst = moNone;
empathyMove(c, c2, neighborId(c2, c)); empathyMove(m.second);
m.second = cw2; m.second = cw2;
} }
} }

View File

@ -5852,7 +5852,7 @@ EX void movegolems(flagtype flags) {
if(m == moFriendlyGhost) c2->stuntime = 1; if(m == moFriendlyGhost) c2->stuntime = 1;
} }
empathyMove(c, c2, dir); empathyMove(mi);
} }
DEBB(DF_TURN, ("other")); DEBB(DF_TURN, ("other"));
} }

View File

@ -460,6 +460,7 @@ struct movei {
else t = s->move(d); else t = s->move(d);
} }
movei(cell *_s, cell *_t, int _d) : s(_s), t(_t), d(_d) {} movei(cell *_s, cell *_t, int _d) : s(_s), t(_t), d(_d) {}
movei(cellwalker cw) : s(cw.at), t(cw.cpeek()), d(cw.spin) {}
movei rev() const { return movei(t, s, rev_dir_or(d)); } movei rev() const { return movei(t, s, rev_dir_or(d)); }
int dir_or(int x) const { return proper() ? d : x; } int dir_or(int x) const { return proper() ? d : x; }
int rev_dir_or(int x) const { return proper() ? s->c.spin(d) : x; } int rev_dir_or(int x) const { return proper() ? s->c.spin(d) : x; }

View File

@ -49,10 +49,6 @@ EX void drainOrb(eItem it, int target IS(0)) {
if(items[it] > target) useupOrb(it, items[it] - target); if(items[it] > target) useupOrb(it, items[it] - target);
} }
EX void empathyMove(cell *c, cell *cto, int dir) {
empathyMove(movei(c, cto, dir)); // to erase
}
EX void empathyMove(const movei& mi) { EX void empathyMove(const movei& mi) {
if(!items[itOrbEmpathy]) return; if(!items[itOrbEmpathy]) return;