The logic required both x and y coordinates of the guard location and
the new location the guard wanted to move to be different. This is
obviously wrong, as the guard may move horizontally or vertically.
register struct monst *grd;
int nx,ny;
{
- if (MON_AT(nx, ny) && nx != grd->mx && ny != grd->my) {
+ if (MON_AT(nx, ny) && !(nx == grd->mx && ny == grd->my)) {
if (!Deaf)
verbalize("Out of my way, scum!");
- if (!rloc(m_at(nx, ny), FALSE) || m_at(nx, ny))
+ if (!rloc(m_at(nx, ny), FALSE) || MON_AT(nx, ny))
m_into_limbo(m_at(nx, ny));
}
}