summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-16 21:13:38 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-16 21:13:38 +0000
commit1e6ed3ddb747d9ac3e8d6b0b6944277006a160f0 (patch)
treeec0d601f68ad890c05320d2daca102931bdbf363 /crawl-ref/source
parent586ad4ccbde60bfef1db8e99b19e168707bfc68e (diff)
downloadcrawl-ref-1e6ed3ddb747d9ac3e8d6b0b6944277006a160f0.tar.gz
crawl-ref-1e6ed3ddb747d9ac3e8d6b0b6944277006a160f0.zip
Add yet more miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5888 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/mon-util.cc2
-rw-r--r--crawl-ref/source/spells3.cc10
2 files changed, 4 insertions, 8 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index b87f450e3f..9fc46d0f7e 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1993,7 +1993,7 @@ mon_intel_type mons_intel(int mc)
habitat_type mons_habitat_by_type(int mc)
{
const monsterentry *me = get_monster_data(mc);
- return (me? me->habitat : HT_LAND);
+ return (me ? me->habitat : HT_LAND);
}
habitat_type mons_habitat(const monsters *m)
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 6f253178e9..a95ed565dc 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1732,14 +1732,10 @@ int halo_radius()
if (you.religion == GOD_SHINING_ONE && you.piety >= piety_breakpoint(0)
&& !you.penance[GOD_SHINING_ONE])
{
- int radius = you.piety / 20;
- if (radius > 8)
- radius = 8;
-
- return radius;
+ return std::min(8, you.piety / 20);
}
- else
- return 0;
+
+ return 0;
}
bool inside_halo(int posx, int posy)