diff options
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; } |