summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/traps.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-06 20:39:11 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-06 20:41:29 +0100
commitceb51161c896f17a951b0ba2bbd4b48f8fead13a (patch)
tree6fb22b76e7cda0eeb93e82db1d853f664765fc13 /crawl-ref/source/traps.cc
parentf858cfc60235a5cfb86dd2a2c510dde5e130a4bf (diff)
downloadcrawl-ref-ceb51161c896f17a951b0ba2bbd4b48f8fead13a.tar.gz
crawl-ref-ceb51161c896f17a951b0ba2bbd4b48f8fead13a.zip
Replace global see_cell by observe_cell and disambiguate old uses.
Calls to plain see_cell(pos) were replaced with either observe_cell(pos) or you.see_cell(pos). observe_cell where related to drawing the interface and messaging, you.see_cell for game mechanics, and one or the other in less clear cases (targetting, say).
Diffstat (limited to 'crawl-ref/source/traps.cc')
-rw-r--r--crawl-ref/source/traps.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index 25a56cfa3e..b8230dfdff 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -311,7 +311,7 @@ void check_net_will_hold_monster(monsters *mons)
if (net != NON_ITEM)
destroy_item(net);
- if (see_cell(mons->pos()))
+ if (observe_cell(mons->pos()))
{
if (mons->visible_to(&you))
{
@@ -351,7 +351,7 @@ void trap_def::trigger(actor& triggerer, bool flat_footed)
const bool trig_knows = !flat_footed && this->is_known(&triggerer);
const bool you_trigger = (triggerer.atype() == ACT_PLAYER);
- const bool in_sight = see_cell(this->pos);
+ const bool in_sight = observe_cell(this->pos);
// If set, the trap will be removed at the end of the
// triggering process.
@@ -1139,7 +1139,7 @@ void trap_def::shoot_ammo(actor& act, bool was_known)
{
if (was_known && act.atype() == ACT_PLAYER)
mpr("The trap is out of ammunition!");
- else if (player_can_hear(this->pos) && see_cell(this->pos))
+ else if (player_can_hear(this->pos) && observe_cell(this->pos))
mpr("You hear a soft click.");
this->disarm();
@@ -1228,7 +1228,7 @@ void trap_def::shoot_ammo(actor& act, bool was_known)
// Determine whether projectile hits.
bool hit = (trap_hit >= act.melee_evasion(NULL));
- if (see_cell(act.pos()))
+ if (observe_cell(act.pos()))
{
mprf("%s %s %s%s!",
shot.name(DESC_CAP_A).c_str(),