old moveMonster removed

This commit is contained in:
Zeno Rogue 2019-11-22 18:19:22 +01:00
parent 9521b622e1
commit e6853e6540
3 changed files with 14 additions and 15 deletions

View File

@ -1802,7 +1802,8 @@ EX namespace hive {
if(!q) { if(c->land == laHive) c->landparam += 3; continue; }
int d = gmoves[hrand(q)];
cell *c2 = c->move(d);
movei mi(c, d);
auto& c2 = mi.t;
if(c2->monst || isPlayerOn(c2)) {
eMonster killed = c2->monst;
if(isPlayerOn(c2)) killed = moPlayer;
@ -1818,7 +1819,7 @@ EX namespace hive {
// c->monst = moDeadBug, deadbug.push_back(c);
}
else {
moveMonster(c2, c, d);
moveMonster(mi);
// pheromones!
if(c->land == laHive && c->landparam < 90) c->landparam += 5;
if(c2->land == laHive && c2->landparam < 90) c2->landparam += 5;
@ -3148,7 +3149,7 @@ EX namespace prairie {
beastAttack(cp, true, true);
if(!cn->monst && !isPlayerOn(cn) && passable_for(cp->monst, cn, cp, P_DEADLY))
moveMonster(cn, cp, NODIR);
moveMonster(movei(cp, cn, TELEPORT));
else {
playSound(NULL, "hit-axe"+pick123());
beastcrash(cn, cp);

View File

@ -3827,10 +3827,6 @@ EX void makeTrollFootprints(cell *c) {
c->landparam = turncount + 100;
}
EX void moveMonster(cell *ct, cell *cf, int direction_hint) {
moveMonster(movei(cf, ct, direction_hint));
}
EX void moveMonster(const movei& mi) {
auto& cf = mi.s;
auto& ct = mi.t;
@ -4499,7 +4495,8 @@ EX cell *moveNormal(cell *c, flagtype mf) {
}
if(!quantum) {
cell *c2 = c->move(d);
movei mi(c, d);
auto& c2 = mi.t;
if(isPlayerOn(c2)) {
if(m == moCrusher) {
addMessage(XLAT("%The1 raises his weapon...", m));
@ -4521,13 +4518,13 @@ EX cell *moveNormal(cell *c, flagtype mf) {
}
else if(m2) {
attackMonster(c2, AF_NORMAL | AF_MSG, m);
animateAttack(movei(c, d), LAYER_SMALL);
animateAttack(mi, LAYER_SMALL);
if(m == moFlailer && m2 == moIllusion)
attackMonster(c, 0, m2);
return c2;
}
moveMonster(c2, c, d);
moveMonster(mi);
if(m == moRagingBull) beastAttack(c2, false, false);
return c2;
}
@ -4553,10 +4550,10 @@ EX cell *moveNormal(cell *c, flagtype mf) {
}
if(!attacking) for(int i=0; i<nc; i++) {
cell *c2 = c->move(posdir[i]);
movei mi(c, posdir[i]);
if(!c->monst) c->monst = m;
moveMonster(c2, c, posdir[i]);
if(m == moRagingBull) beastAttack(c2, false, false);
moveMonster(mi);
if(m == moRagingBull) beastAttack(mi.t, false, false);
}
return c->move(d);
}
@ -5076,7 +5073,7 @@ EX void groupmove2(cell *c, cell *from, int d, eMonster movtype, flagtype mf) {
return;
}
moveMonster(from, c, revhint(from, d));
moveMonster(movei(from, d).rev());
onpath(from, 0);
}
onpath(c, 0);
@ -5428,7 +5425,7 @@ EX void moveghosts() {
addMessage(XLAT("%The1 scares %the2 a bit!", c->monst, c2->monst));
c2->stuntime = 1;
}
else moveMonster(c2, c, d);
else moveMonster(movei(c, d));
}
nextghost: ;

View File

@ -445,6 +445,7 @@ inline cellwalker operator+ (heptspin hs, cth_t) { return cellwalker(hs.at->c7,
constexpr int STRONGWIND = 99;
constexpr int FALL = 98;
constexpr int NO_SPACE = 97;
constexpr int TELEPORT = 96;
namespace whirlwind { cell *jumpDestination(cell*); }