Move mtrack push and clear to separate functions

This commit is contained in:
Pasi Kallinen
2022-07-16 18:43:22 +03:00
parent fcbeed21cc
commit 94c1e94d20
7 changed files with 28 additions and 17 deletions

View File

@@ -357,7 +357,7 @@ mon_arrive(struct monst *mtmp, int when)
ylocale = mtmp->mtrack[1].y;
fromdlev.dnum = mtmp->mtrack[2].x;
fromdlev.dlevel = mtmp->mtrack[2].y;
memset(mtmp->mtrack, 0, sizeof mtmp->mtrack);
mon_track_clear(mtmp);
if (mtmp == u.usteed)
return; /* don't place steed on the map */