diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-26 20:50:09 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-26 20:50:09 +0000 |
commit | 4698cb53dc2ed6cb7dad084753af024f3059d839 (patch) | |
tree | 30b07d35619f58e124299d43b9418432fed97c37 /crawl-ref | |
parent | 6717f13e25e85f21d0069d396bb40315ed6f4bd6 (diff) | |
download | crawl-ref-4698cb53dc2ed6cb7dad084753af024f3059d839.tar.gz crawl-ref-4698cb53dc2ed6cb7dad084753af024f3059d839.zip |
Add still more minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8796 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/effects.cc | 11 | ||||
-rw-r--r-- | crawl-ref/source/stuff.h | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 2f6e1bf7b3..08a2308201 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -3461,10 +3461,10 @@ static void _catchup_monster_moves(monsters *mon, int turns) const int moves = (range > 50) ? 50 : range; // const bool short_time = (range >= 5 + random2(10)); - const bool long_time = (range >= (500 + roll_dice( 2, 500 ))); + const bool long_time = (range >= (500 + roll_dice(2, 500))); - const bool ranged_attack = (mons_has_ranged_spell( mon, true ) - || mons_has_ranged_attack( mon )); + const bool ranged_attack = (mons_has_ranged_spell(mon, true) + || mons_has_ranged_attack(mon)); #if DEBUG_DIAGNOSTICS // probably too annoying even for DEBUG_DIAGNOSTICS @@ -3529,7 +3529,7 @@ static void _catchup_monster_moves(monsters *mon, int turns) } else { - shift_monster( mon, mon->pos() ); + shift_monster(mon, mon->pos()); #if DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "shifted to (%d,%d)", @@ -3551,7 +3551,6 @@ static void _catchup_monster_moves(monsters *mon, int turns) if (pos.x + inc.x < 0 || pos.x + inc.x >= GXM) inc.x = 0; - if (pos.y + inc.y < 0 || pos.y + inc.y >= GYM) inc.y = 0; @@ -3574,7 +3573,7 @@ static void _catchup_monster_moves(monsters *mon, int turns) shift_monster(mon, mon->pos()); #if DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "moved to (%d,%d)", mon->pos().x, mon->pos().y ); + mprf(MSGCH_DIAGNOSTICS, "moved to (%d, %d)", mon->pos().x, mon->pos().y); #endif } diff --git a/crawl-ref/source/stuff.h b/crawl-ref/source/stuff.h index 3e65492b17..74e90b86e7 100644 --- a/crawl-ref/source/stuff.h +++ b/crawl-ref/source/stuff.h @@ -206,7 +206,7 @@ inline bool testbits(unsigned long flags, unsigned long test) template <typename Z> inline Z sgn(Z x) { - return (x < 0? -1 : (x > 0? 1 : 0)); + return (x < 0 ? -1 : (x > 0 ? 1 : 0)); } bool is_trap_square(dungeon_feature_type grid); |