summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-22 19:13:56 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-22 22:37:09 +0200
commit1fdd4abbce290f4d656bf29ce65d70ab5025871d (patch)
treec258b3f9f522191f19f3c45315969905be4d9aa8 /crawl-ref/source
parent8d4d79655dd503417920299808993cef658bdde0 (diff)
downloadcrawl-ref-1fdd4abbce290f4d656bf29ce65d70ab5025871d.tar.gz
crawl-ref-1fdd4abbce290f4d656bf29ce65d70ab5025871d.zip
Get rid of player_monster_visible.
The special casing for drowning monsters appears to have been obsoloted by checking ENCH_SUBMERGED instead of calling mons_is_submerged.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/AppHdr.cc2
-rw-r--r--crawl-ref/source/beam.cc6
-rw-r--r--crawl-ref/source/delay.cc2
-rw-r--r--crawl-ref/source/directn.cc16
-rw-r--r--crawl-ref/source/files.cc2
-rw-r--r--crawl-ref/source/misc.cc2
-rw-r--r--crawl-ref/source/mon-util.cc18
-rw-r--r--crawl-ref/source/monplace.cc2
-rw-r--r--crawl-ref/source/monstuff.cc6
-rw-r--r--crawl-ref/source/mstuff2.cc2
-rw-r--r--crawl-ref/source/ouch.cc2
-rw-r--r--crawl-ref/source/player.cc26
-rw-r--r--crawl-ref/source/player.h7
-rw-r--r--crawl-ref/source/religion.cc2
-rw-r--r--crawl-ref/source/spells2.cc2
-rw-r--r--crawl-ref/source/spl-cast.cc2
-rw-r--r--crawl-ref/source/state.cc2
-rw-r--r--crawl-ref/source/tilepick.cc2
-rw-r--r--crawl-ref/source/traps.cc14
-rw-r--r--crawl-ref/source/travel.cc2
-rw-r--r--crawl-ref/source/tutorial.cc2
-rw-r--r--crawl-ref/source/view.cc6
22 files changed, 48 insertions, 79 deletions
diff --git a/crawl-ref/source/AppHdr.cc b/crawl-ref/source/AppHdr.cc
index 91e3e9f392..0b84e03d67 100644
--- a/crawl-ref/source/AppHdr.cc
+++ b/crawl-ref/source/AppHdr.cc
@@ -1,3 +1,3 @@
/* This file is for MSVC to generate a precompiled header */
-#include "AppHdr.h" \ No newline at end of file
+#include "AppHdr.h"
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index a8cf344bcc..bfd01beb68 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -137,7 +137,7 @@ static void _zap_animation(int colour, const monsters *mon = NULL,
if (mon)
{
- if (!force && !player_monster_visible(mon))
+ if (!force && !mon->visible_to(&you))
return;
p = mon->pos();
@@ -5204,10 +5204,10 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon)
{
mprf("%s flickers %s",
monster_name.c_str(),
- player_monster_visible(mon) ? "for a moment."
+ mon->visible_to(&you) ? "for a moment."
: "and vanishes!" );
- if (!player_monster_visible(mon))
+ if (!mon->visible_to(&you))
autotoggle_autopickup(true);
}
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index ae2800430c..b307c6a837 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -1929,7 +1929,7 @@ static bool _paranoid_option_disable( activity_interrupt_type ai,
if (ai == AI_HIT_MONSTER || ai == AI_MONSTER_ATTACKS)
{
const monsters* mon = static_cast<const monsters*>(at.data);
- if (mon && !player_monster_visible(mon) && !mons_is_submerged(mon))
+ if (mon && !mon->visible_to(&you) && !mons_is_submerged(mon))
autotoggle_autopickup(true);
return (true);
}
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index 9c4a05d51d..17ac92944d 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -278,7 +278,7 @@ static void _draw_ray_glyph(const coord_def &pos, int colour,
{
if (const monsters *mons = monster_at(pos))
{
- if (mons->alive() && player_monster_visible(mons))
+ if (mons->alive() && mons->visible_to(&you))
{
glych = get_screen_glyph(pos);
colour = mcol;
@@ -300,7 +300,7 @@ static bool _mon_submerged_in_water(const monsters *mon)
return (grd(mon->pos()) == DNGN_SHALLOW_WATER
&& see_cell(mon->pos())
- && !player_monster_visible(mon)
+ && !mon->visible_to(&you)
&& !mons_flies(mon));
}
@@ -1812,7 +1812,7 @@ void get_square_desc(const coord_def &c, describe_info &inf,
const monsters* mons = monster_at(c);
const int oid = igrd(c);
- if (mons && player_monster_visible(mons))
+ if (mons && mons->visible_to(&you))
{
// First priority: monsters.
if (examine_mons && !mons_is_unknown_mimic(mons))
@@ -1855,7 +1855,7 @@ void full_describe_square(const coord_def &c)
const monsters* mons = monster_at(c);
const int oid = igrd(c);
- if (mons && player_monster_visible(mons))
+ if (mons && mons->visible_to(&you))
{
// First priority: monsters.
describe_monsters(*mons);
@@ -1955,7 +1955,7 @@ static bool _mons_is_valid_target(const monsters *mon, int mode, int range)
}
// Don't usually target unseen monsters...
- if (!player_monster_visible(mon))
+ if (!mon->visible_to(&you))
{
// ...unless it creates a "disturbance in the water".
// Since you can't see the monster, assume it's not a friend.
@@ -2094,7 +2094,7 @@ static bool _find_object(const coord_def& where, int mode,
bool is_mimic = false;
const monsters* m = monster_at(where);
if (m
- && player_monster_visible(m)
+ && m->visible_to(&you)
&& mons_is_mimic(m->type)
&& !(m->flags & MF_KNOWN_MIMIC))
{
@@ -3368,10 +3368,10 @@ static void _describe_cell(const coord_def& where, bool in_range)
}
#if DEBUG_DIAGNOSTICS
- if (!player_monster_visible(mon))
+ if (!mon->visible_to(&you))
mpr("There is a non-visible monster here.", MSGCH_DIAGNOSTICS);
#else
- if (!player_monster_visible(mon))
+ if (!mon->visible_to(&you))
goto look_clouds;
#endif
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index d92fa90c06..6e25f41248 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1065,7 +1065,7 @@ static void _grab_followers()
if (fmenv->type == MONS_PLAYER_GHOST
&& fmenv->hit_points < fmenv->max_hit_points / 2)
{
- if (player_monster_visible(fmenv))
+ if (fmenv->visible_to(&you))
mpr("The ghost fades into the shadows.");
monster_teleport(fmenv, true);
}
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 987975349b..6621c529b9 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2829,7 +2829,7 @@ std::vector<monsters*> get_nearby_monsters(bool want_move,
if (monsters* mon = monster_at(*ri))
{
if (mon->alive()
- && (!require_visible || player_monster_visible(mon))
+ && (!require_visible || mon->visible_to(&you))
&& !mons_is_submerged(mon)
&& !mons_is_unknown_mimic(mon)
&& (!dangerous_only || !mons_is_safe(mon, want_move,
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index dbcdd7ed6a..6ba4f7612b 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -5936,7 +5936,7 @@ bool monsters::has_damage_type(int dam_type)
bool monsters::visible() const
{
- return (mons_near(this) && player_monster_visible(this));
+ return (mons_near(this) && visible_to(&you));
}
bool monsters::confused() const
@@ -7001,7 +7001,7 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet)
if (!quiet)
simple_monster_message(this, " is no longer charmed.");
- if (mons_near(this) && player_monster_visible(this))
+ if (you.can_see(this))
{
// and fire activity interrupts
interrupt_activity(AI_SEE_MONSTER,
@@ -7022,7 +7022,7 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet)
case ENCH_BACKLIGHT:
if (!quiet)
{
- if (player_monster_visible(this))
+ if (visible_to(&you))
simple_monster_message(this, " stops glowing.");
else if (has_ench(ENCH_INVIS) && mons_near(this))
{
@@ -7421,7 +7421,7 @@ void monsters::apply_enchantment(const mon_enchant &me)
if (mon_size < random2(SIZE_BIG) // BIG = 5
&& !has_ench(ENCH_BERSERK) && type != MONS_DANCING_WEAPON)
{
- if (mons_near(this) && !player_monster_visible(this))
+ if (mons_near(this) && !visible_to(&you))
mpr("Something wriggles in the net.");
else
simple_monster_message(this, " struggles to escape the net.");
@@ -7439,7 +7439,7 @@ void monsters::apply_enchantment(const mon_enchant &me)
else // Large (and above) monsters always thrash the net and destroy it
{ // e.g. ogre, large zombie (large); centaur, naga, hydra (big).
- if (mons_near(this) && !player_monster_visible(this))
+ if (mons_near(this) && !visible_to(&you))
mpr("Something wriggles in the net.");
else
simple_monster_message(this, " struggles against the net.");
@@ -7497,7 +7497,7 @@ void monsters::apply_enchantment(const mon_enchant &me)
{
if (mons_near(this))
{
- if (player_monster_visible(this))
+ if (visible_to(&you))
{
mprf("The net rips apart, and %s comes free!",
name(DESC_NOCAP_THE).c_str());
@@ -7626,7 +7626,7 @@ void monsters::apply_enchantment(const mon_enchant &me)
{
if (feat_is_watery(grd(pos())))
{
- if (mons_near(this) && player_monster_visible(this))
+ if (mons_near(this) && visible_to(&you))
mprf("The flames covering %s go out.",
this->name(DESC_NOCAP_THE, false).c_str());
del_ench(ENCH_STICKY_FLAME);
@@ -8185,7 +8185,7 @@ bool monsters::do_shaft()
{
if (mons_near(this))
{
- if (player_monster_visible(this))
+ if (visible_to(&you))
{
mprf("A shaft briefly opens up underneath %s!",
name(DESC_NOCAP_THE).c_str());
@@ -8471,7 +8471,7 @@ void monsters::react_to_damage(int damage, beam_type flavour, kill_category whos
}
const bool needs_message = spawned && mons_near(this)
- && player_monster_visible(this);
+ && visible_to(&you);
if (needs_message)
{
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 2bcc9a281c..10d64b8dc7 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -918,7 +918,7 @@ int place_monster(mgen_data mg, bool force_pos)
{
std::string msg;
- if (player_monster_visible( &menv[id] ))
+ if (menv[id].visible_to(&you))
msg = menv[id].name(DESC_CAP_A);
else if (shoved)
msg = "Something";
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index e73bdfb52c..5c0c7000de 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1436,7 +1436,7 @@ int monster_die(monsters *monster, killer_type killer,
const bool death_message = !silent && !did_death_message
&& mons_near(monster)
- && (player_monster_visible(monster)
+ && (monster->visible_to(&you)
|| crawl_state.arena);
const bool created_friendly = testbits(monster->flags, MF_CREATED_FRIENDLY);
@@ -1975,7 +1975,7 @@ int monster_die(monsters *monster, killer_type killer,
}
// If we kill an invisible monster reactivate autopickup.
- if (mons_near(monster) && !player_monster_visible(monster))
+ if (mons_near(monster) && !monster->visible_to(&you))
autotoggle_autopickup(false);
crawl_state.dec_mon_acting(monster);
@@ -4960,7 +4960,7 @@ bool simple_monster_message(const monsters *monster, const char *event,
if ((mons_near(monster) || crawl_state.arena)
&& (channel == MSGCH_MONSTER_SPELL || channel == MSGCH_FRIEND_SPELL
- || player_monster_visible(monster) || crawl_state.arena))
+ || monster->visible_to(&you) || crawl_state.arena))
{
std::string msg = monster->name(descrip);
msg += event;
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index b8141646de..a7b8e20fe9 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -1348,7 +1348,7 @@ void monster_teleport(monsters *monster, bool instan, bool silent)
}
}
- if (player_monster_visible(monster) && now_visible)
+ if (monster->visible_to(&you) && now_visible)
handle_seen_interrupt(monster);
// Leave a purple cloud.
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index cfcc31cd54..d18060aa54 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -784,7 +784,7 @@ static void _xom_checks_damage(kill_method_type death_type,
// creature of lower level than yourself.
amusementvalue += leveldif * leveldif * dam;
- if (!player_monster_visible(monster))
+ if (!monster->visible_to(&you))
amusementvalue += 10;
if (monster->speed < 100/player_movement_speed())
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index e98289b351..35ee075333 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2702,30 +2702,6 @@ int player_shield_class(void) //jmf: changes for new spell
return (base_shield);
}
-// This does NOT do line of sight! It checks the monster's visibility
-// with respect to the players perception, but doesn't do walls or
-// range. To find if the square the monster is in LOS, see mons_near().
-bool player_monster_visible(const monsters *mon)
-{
- if (!you.can_see_invisible() && mon->invisible())
- return (false);
-
- if (!mons_is_submerged(mon))
- return (true);
-
- const dungeon_feature_type feat = grd(mon->pos());
-
- // Treat monsters who are submerged due to drowning as visible, so
- // we get proper messages when they die. Monsters can only drown in
- // lava or deep water, so monsters that are "submerged" in other
- // features (air elementals in air, trapdoor spiders in the floor)
- // are exempt from this check.
- if (feat != DNGN_LAVA && feat != DNGN_DEEP_WATER)
- return (false);
-
- return (mon->can_drown());
-}
-
// Returns true if player is mesmerised by a given monster.
bool player_mesmerised_by(const monsters *mon)
{
@@ -7173,7 +7149,7 @@ int player::hurt(const actor *agent, int amount, beam_type flavour,
{
const monsters *mon = dynamic_cast<const monsters*>(agent);
ouch(amount, mon->mindex(),
- KILLED_BY_MONSTER, "", player_monster_visible(mon));
+ KILLED_BY_MONSTER, "", mon->visible_to(&you));
}
else
{
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index 3fdf9abff8..2101cea229 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -756,13 +756,6 @@ int scan_artefacts(artefact_prop_type which_property, bool calc_unid = true);
int slaying_bonus(char which_affected);
-/* ***********************************************************************
- * called from: beam - decks - direct - effects - fight - files - it_use2 -
- * items - monstuff - mon-util - mstuff2 - spells1 - spells2 -
- * spells3
- * *********************************************************************** */
-bool player_monster_visible(const monsters *mon);
-
bool player_mesmerised_by(const monsters *mon);
void update_beholders(const monsters *mon, bool force = false);
void check_beholders();
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 96533db1b0..d9150dc922 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -7459,7 +7459,7 @@ int get_tension(god_type god, bool count_travelling)
{
if (!mons->can_see_invisible())
exper /= 2;
- if (!player_monster_visible(mons))
+ if (!mons->visible_to(&you))
exper *= 2;
}
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 66a8422b87..c3e553e950 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -197,7 +197,7 @@ int detect_creatures(int pow, bool telepathic)
if (monsters *mon = monster_at(*ri))
{
// If you can see the monster, don't "detect" it elsewhere.
- if (!mons_near(mon) || !player_monster_visible(mon))
+ if (!mons_near(mon) || !mon->visible_to(&you))
{
creatures_found++;
_mark_detected_creature(*ri, mon, fuzz_chance, fuzz_radius);
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 1f0802af03..882384fa85 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -645,7 +645,7 @@ static int _get_dist_to_nearest_monster()
if (mon == NULL)
continue;
- if (!player_monster_visible(mon)
+ if (!mon->visible_to(&you)
|| mons_is_unknown_mimic(mon))
{
continue;
diff --git a/crawl-ref/source/state.cc b/crawl-ref/source/state.cc
index aeb3739d1d..f7b5d5f83e 100644
--- a/crawl-ref/source/state.cc
+++ b/crawl-ref/source/state.cc
@@ -241,7 +241,7 @@ bool interrupt_cmd_repeat( activity_interrupt_type ai,
const monsters* mon = static_cast<const monsters*>(at.data);
if (mons_class_flag(mon->type, M_NO_EXP_GAIN)
- && player_monster_visible(mon))
+ && mon->visible_to(&you))
{
return (false);
}
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 0429f94511..1c8b18a8b2 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -4631,7 +4631,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected)
env.tile_fg[ep.x][ep.y] = t;
const monsters *mon = &menv[idx];
- if (!player_monster_visible(mon)
+ if (!mon->visible_to(&you)
|| mons_is_lurking(mon)
|| mons_is_unknown_mimic(mon)
|| mons_class_flag(mon->type, M_NO_EXP_GAIN))
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index 990e277e51..adf833ca02 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -257,7 +257,7 @@ void monster_caught_in_net(monsters *mon, bolt &pbolt)
if (!mons_is_caught(mon) && mon->add_ench(ENCH_HELD))
{
- if (mons_near(mon) && !player_monster_visible(mon))
+ if (mons_near(mon) && !mon->visible_to(&you))
mpr("Something gets caught in the net!");
else
simple_monster_message(mon, " is caught in the net!");
@@ -311,7 +311,7 @@ void check_net_will_hold_monster(monsters *mons)
if (see_cell(mons->pos()))
{
- if (player_monster_visible(mons))
+ if (mons->visible_to(&you))
{
mprf("The net rips apart, and %s comes free!",
mons->name(DESC_NOCAP_THE).c_str());
@@ -472,7 +472,7 @@ void trap_def::trigger(actor& triggerer, bool flat_footed)
if (in_sight)
{
std::string msg = "A huge blade swings out";
- if (player_monster_visible( m ))
+ if (m->visible_to(&you))
{
msg += " and slices into ";
msg += m->name(DESC_NOCAP_THE);
@@ -559,7 +559,7 @@ void trap_def::trigger(actor& triggerer, bool flat_footed)
if (in_sight)
{
msg::stream << "A large net falls down";
- if (player_monster_visible(m))
+ if (m->visible_to(&you))
msg::stream << " onto " << m->name(DESC_NOCAP_THE);
msg::stream << "!" << std::endl;
}
@@ -830,7 +830,7 @@ void remove_net_from(monsters *mon)
paralys = random2(5);
int invis = 0;
- if (!player_monster_visible(mon)) // makes this harder
+ if (!mon->visible_to(&you)) // makes this harder
invis = 3 + random2(5);
bool net_destroyed = false;
@@ -852,7 +852,7 @@ void remove_net_from(monsters *mon)
if (!net_destroyed)
{
- if (player_monster_visible(mon))
+ if (mon->visible_to(&you))
{
mprf("You fail to remove the net from %s.",
mon->name(DESC_NOCAP_THE).c_str());
@@ -869,7 +869,7 @@ void remove_net_from(monsters *mon)
mon->del_ench(ENCH_HELD, true);
remove_item_stationary(mitm[net]);
- if (player_monster_visible(mon))
+ if (mon->visible_to(&you))
mprf("You free %s.", mon->name(DESC_NOCAP_THE).c_str());
else
mpr("You loosen the net.");
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index c4dfb69420..84153bc747 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -568,7 +568,7 @@ static bool _is_monster_blocked(const coord_def& c)
{
const monsters *mons = monster_at(c);
return (mons
- && player_monster_visible(mons)
+ && mons->visible_to(&you)
&& mons_is_stationary(mons)
&& mons_was_seen(mons)
&& !mons_is_unknown_mimic(mons));
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index f3168058fd..65019c5078 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -4455,7 +4455,7 @@ static bool _water_is_disturbed(int x, int y)
if (mon == NULL || grd(c) != DNGN_SHALLOW_WATER || !see_cell(c))
return (false);
- return (!player_monster_visible(mon) && !mons_flies(mon));
+ return (!mon->visible_to(&you) && !mons_flies(mon));
}
bool tutorial_monster_interesting(const monsters *mons)
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index fb10354149..d680af4e79 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -1080,7 +1080,7 @@ void handle_monster_shouts(monsters* monster, bool force)
// Silent monsters can give noiseless "visual shouts" if the
// player can see them, in which case silence isn't checked for.
- if (s_type == S_SILENT && !player_monster_visible(monster)
+ if (s_type == S_SILENT && !monster->visible_to(&you)
|| s_type != S_SILENT && !player_can_hear(monster->pos()))
{
return;
@@ -1306,7 +1306,7 @@ inline static bool _update_monster_grid(const monsters *monster)
{
const coord_def e = grid2show(monster->pos());
- if (!player_monster_visible( monster ))
+ if (!monster->visible_to(&you))
{
// ripple effect?
if (grd(monster->pos()) == DNGN_SHALLOW_WATER
@@ -1426,7 +1426,7 @@ void update_monsters_in_view()
// FIXME: is this correct?
monster->flags |= MF_WAS_IN_VIEW;
}
- else if (player_monster_visible(monster))
+ else if (monster->visible_to(&you))
{
handle_seen_interrupt(monster);
seen_monster(monster);