diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-18 03:08:45 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-18 03:08:45 +0000 |
commit | c6b621bf1bfc70baa0ea87b15e4e4656c6a43457 (patch) | |
tree | 575b8d006b0d5ef217723fc3144e4397fe1fa6c2 /crawl-ref/source/monplace.cc | |
parent | a8aa8841073e62b9404166a164fc54cd476ace02 (diff) | |
download | crawl-ref-c6b621bf1bfc70baa0ea87b15e4e4656c6a43457.tar.gz crawl-ref-c6b621bf1bfc70baa0ea87b15e4e4656c6a43457.zip |
Add more miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5931 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 46b8f41630..2a54fae689 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -503,8 +503,10 @@ static monster_type _resolve_monster_type(monster_type mon_type, static int _is_near_stairs(coord_def &p) { int result = 0; - for (int i = -1; i <= 1; i++) - for (int j = -1; j <= 1; j++) + + for (int i = -1; i <= 1; ++i) + { + for (int j = -1; j <= 1; ++j) { if (!in_bounds(p)) continue; @@ -519,9 +521,10 @@ static int _is_near_stairs(coord_def &p) // Should there be several stairs, don't overwrite the // player on stairs info. if (result < 2) - result = (p == you.pos() ? 2 : 1); + result = (p == you.pos()) ? 2 : 1; } } + } return result; } |