Add m_next2u, analogous to m_next2m and next2u

This commit is contained in:
Pasi Kallinen
2024-01-19 21:53:25 +02:00
parent b6bc3ef698
commit 57747535af
15 changed files with 36 additions and 34 deletions

View File

@@ -2435,7 +2435,7 @@ escape_from_sticky_mon(coordxy x, coordxy y)
if (u.ustuck && (x != u.ustuck->mx || y != u.ustuck->my)) {
struct monst *mtmp;
if (!next2u(u.ustuck->mx, u.ustuck->my)) {
if (!m_next2u(u.ustuck)) {
/* perhaps it fled (or was teleported or ... ) */
set_ustuck((struct monst *) 0);
} else if (sticks(gy.youmonst.data)) {