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:
@@ -1207,7 +1207,7 @@ static boolean
|
|||||||
watchman_canseeu(struct monst *mtmp)
|
watchman_canseeu(struct monst *mtmp)
|
||||||
{
|
{
|
||||||
if (is_watch(mtmp->data) && mtmp->mcansee && m_canseeu(mtmp)
|
if (is_watch(mtmp->data) && mtmp->mcansee && m_canseeu(mtmp)
|
||||||
&& couldsee(mtmp->mx, mtmp->my) && mtmp->mpeaceful)
|
&& mtmp->mpeaceful)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user