setdist in moveWorm to prevent moving through ungenerated land

This commit is contained in:
Zeno Rogue 2020-03-05 22:34:31 +01:00
parent 8e0c066e33
commit a053da7da2
1 changed files with 2 additions and 0 deletions

View File

@ -881,6 +881,7 @@ EX void moveWorm(cell *c) {
c->monst = eMonster(moWormtail + id);
goal->mondir = mi.rev_dir_or(NODIR);
goal->monmirror = c->monmirror ^ c->c.mirror(dir);
setdist(goal, 6, nullptr);
mountmove(mi, true);
@ -1206,6 +1207,7 @@ EX void moveHexSnake(const movei& mi, bool mounted) {
// note: move from 'c' to 'from'!
auto& from = mi.t;
auto& c = mi.s;
setdist(from, 6, nullptr);
if(from->wall == waBoat) from->wall = waSea;
moveEffect(mi, c->monst);
from->monst = c->monst; from->mondir = mi.rev_dir_or(NODIR); from->hitpoints = c->hitpoints;