summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/effects.cc11
-rw-r--r--crawl-ref/source/stuff.h2
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);