Mercurial > hg > early-roguelike
diff arogue5/monsters.c @ 311:28e22fb35989
Fix one more batch of compiler warnings.
A few of these were potential bugs.
author | John "Elwin" Edwards |
---|---|
date | Tue, 04 May 2021 21:03:47 -0400 |
parents | e52a8a7ad4c5 |
children |
line wrap: on
line diff
--- a/arogue5/monsters.c Mon May 03 19:05:37 2021 -0400 +++ b/arogue5/monsters.c Tue May 04 21:03:47 2021 -0400 @@ -770,12 +770,12 @@ /* * Every time he sees mean monster, it might start chasing him */ - if (on(*tp, ISMEAN) && + if ((on(*tp, ISMEAN) && off(*tp, ISHELD) && off(*tp, ISRUN) && rnd(100) > 33 && (!is_stealth(&player) || (on(*tp, ISUNIQUE) && rnd(100) > 95)) && - (off(player, ISINVIS) || on(*tp, CANSEE)) || + (off(player, ISINVIS) || on(*tp, CANSEE))) || (trp != NULL && (trp->r_flags & ISTREAS))) { tp->t_dest = &hero; turn_on(*tp, ISRUN);