summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/areas.cc
diff options
context:
space:
mode:
authorpubby <pubby8@gmail.com>2013-06-30 14:01:58 -0500
committerNeil Moore <neil@s-z.org>2013-06-30 18:49:12 -0400
commitfaf8416790ef3e910264d7ef83a243078e933cb2 (patch)
treed5d6e74dbad7fd7ab61e0c793b370cb9f5c46540 /crawl-ref/source/areas.cc
parent3dbd8d124c34f4fcf6db89c28bbeb6d6ed53b8c8 (diff)
downloadcrawl-ref-faf8416790ef3e910264d7ef83a243078e933cb2.tar.gz
crawl-ref-faf8416790ef3e910264d7ef83a243078e933cb2.zip
Remove use of 'you' inside player member functions
'you' seemed to be pointless in such context anyways, and lead to some const correctness bugs since '*this' could have a different const-ness from 'you'.
Diffstat (limited to 'crawl-ref/source/areas.cc')
-rw-r--r--crawl-ref/source/areas.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/areas.cc b/crawl-ref/source/areas.cc
index d2e275b9cd..633cc1f2bd 100644
--- a/crawl-ref/source/areas.cc
+++ b/crawl-ref/source/areas.cc
@@ -549,7 +549,7 @@ static int _silence_range(int dur)
int player::silence_radius2() const
{
- return _silence_range(you.duration[DUR_SILENCE]);
+ return _silence_range(duration[DUR_SILENCE]);
}
int monster::silence_radius2() const
@@ -597,11 +597,11 @@ int player::halo_radius2() const
{
int size = -1;
- if (you.religion == GOD_SHINING_ONE && you.piety >= piety_breakpoint(0)
- && !you.penance[GOD_SHINING_ONE])
+ if (religion == GOD_SHINING_ONE && piety >= piety_breakpoint(0)
+ && !penance[GOD_SHINING_ONE])
{
// Preserve the middle of old radii.
- const int r = you.piety - 10;
+ const int r = piety - 10;
// The cap is 64, just less than the LOS of 65.
size = min(LOS_RADIUS*LOS_RADIUS, r * r / 400);
}
@@ -661,7 +661,7 @@ int monster::halo_radius2() const
int player::liquefying_radius2() const
{
- return _silence_range(you.duration[DUR_LIQUEFYING]);
+ return _silence_range(duration[DUR_LIQUEFYING]);
}
int monster::liquefying_radius2() const
@@ -840,7 +840,7 @@ int player::soul_aura_radius2() const
// Player radius
int player::heat_radius2() const
{
- if (you.species != SP_LAVA_ORC)
+ if (species != SP_LAVA_ORC)
return -1;
if (!temperature_effect(LORC_HEAT_AURA))