redundant comparison code watchman_canseeu()

m_canseeu() already includes couldsee() so redundant code was flagged.

: #define m_canseeu(m) \
:     ((!Invis || perceives((m)->data))                      \
:      && !Underwater                                        \
:      && couldsee((m)->mx, (m)->my))

static boolean
watchman_canseeu(struct monst *mtmp)
{
    if (is_watch(mtmp->data) && mtmp->mcansee && m_canseeu(mtmp)
        && couldsee(mtmp->mx, mtmp->my) && mtmp->mpeaceful)
        return TRUE;
    return FALSE;
}
This commit is contained in:
nhmall
2022-09-07 07:52:33 -04:00
parent e952f67f2c
commit feebb561d6

View File

@@ -1207,7 +1207,7 @@ static boolean
watchman_canseeu(struct monst *mtmp)
{
if (is_watch(mtmp->data) && mtmp->mcansee && m_canseeu(mtmp)
&& couldsee(mtmp->mx, mtmp->my) && mtmp->mpeaceful)
&& mtmp->mpeaceful)
return TRUE;
return FALSE;
}