git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6629 c06c8d41-db1a-0410-9941-cceddc491573
3ZEUBINC2EEJYVO5AYQZBCU3RKDGONBJYKYHTBTHICPOGPSRXI2QC
int ystart = you.y_pos - 9, xstart = you.x_pos - 9;
int yend = you.y_pos + 9, xend = you.x_pos + 9;
if ( xstart < 0 ) xstart = 0;
if ( ystart < 0 ) ystart = 0;
if ( xend >= GXM ) xend = GXM - 1;
if ( yend >= GYM ) yend = GYM - 1;
for (int y = ystart; y <= yend; ++y)
for (int x = xstart; x <= xend; ++x)
if (see_grid(x,y))
for (radius_iterator ri(you.pos(), LOS_RADIUS); ri; ++ri )
{
if ( mgrd(*ri) != NON_MONSTER )
{
const monsters *mon = &menv[mgrd(*ri)];
if (player_monster_visible(mon)
&& !mons_is_submerged(mon)
&& (!mons_is_mimic(mon->type)
|| testbits(mon->flags, MF_KNOWN_MIMIC)))
const unsigned short targ_monst = mgrd[x][y];
if (targ_monst != NON_MONSTER)
{
const monsters *mon = &menv[targ_monst];
if (player_monster_visible(mon)
&& !mons_is_submerged(mon)
&& (!mons_is_mimic(mon->type)
|| testbits(mon->flags, MF_KNOWN_MIMIC)))
{
mons.push_back(mon);
}
}
mons.push_back(mon);