Fix mnearto return value confusion
This caused appeased shopkeepers returning to their shops being killed.
This commit is contained in:
@@ -2518,8 +2518,8 @@ struct monst *mtmp;
|
|||||||
/* mnearto()
|
/* mnearto()
|
||||||
* Put monster near (or at) location if possible.
|
* Put monster near (or at) location if possible.
|
||||||
* Returns:
|
* Returns:
|
||||||
* 1 - if a monster was moved from x, y to put mtmp at x, y.
|
* true if relocation was successful
|
||||||
* 0 - in most cases.
|
* false otherwise
|
||||||
*/
|
*/
|
||||||
boolean
|
boolean
|
||||||
mnearto(mtmp, x, y, move_other)
|
mnearto(mtmp, x, y, move_other)
|
||||||
@@ -2532,7 +2532,7 @@ boolean move_other; /* make sure mtmp gets to x, y! so move m_at(x, y) */
|
|||||||
coord mm;
|
coord mm;
|
||||||
|
|
||||||
if (mtmp->mx == x && mtmp->my == y)
|
if (mtmp->mx == x && mtmp->my == y)
|
||||||
return FALSE;
|
return TRUE;
|
||||||
|
|
||||||
if (move_other && (othermon = m_at(x, y)) != 0) {
|
if (move_other && (othermon = m_at(x, y)) != 0) {
|
||||||
if (othermon->wormno)
|
if (othermon->wormno)
|
||||||
@@ -2570,7 +2570,7 @@ boolean move_other; /* make sure mtmp gets to x, y! so move m_at(x, y) */
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* monster responds to player action; not the same as a passive attack;
|
/* monster responds to player action; not the same as a passive attack;
|
||||||
|
|||||||
Reference in New Issue
Block a user