summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2009-12-10 14:24:40 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2009-12-10 14:24:40 +0100
commitf1ef80cc67b73ae63865564ece8032e9b2276234 (patch)
treeabad1e086f495500e06f76b60e6268a1a7c8eb75 /crawl-ref/source/spells3.cc
parent4b71037efe0a72b312c377bbc39f2ffd279edaab (diff)
downloadcrawl-ref-f1ef80cc67b73ae63865564ece8032e9b2276234.tar.gz
crawl-ref-f1ef80cc67b73ae63865564ece8032e9b2276234.zip
Tidy up bracket placement according to our coding conventions.
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 1c25a5ee72..480730e6f9 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1447,7 +1447,7 @@ bool _cell_vetoes_teleport (const coord_def cell, bool check_monsters = true)
}
}
-void _handle_teleport_update (bool large_change, bool check_ring_TC,
+void _handle_teleport_update (bool large_change, bool check_ring_TC,
const coord_def old_pos)
{
if (large_change)
@@ -1566,9 +1566,13 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
if (pos == you.pos() || pos == coord_def(-1,-1))
{
if (!wizard_tele)
+ {
if (!yesno("Are you sure you want to cancel this teleport?",
true, 'n'))
+ {
continue;
+ }
+ }
you.turn_is_over = false;
return (false);
}
@@ -1582,7 +1586,6 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
more();
continue;
}
-
break;
}
@@ -1598,8 +1601,8 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
pos.y += random2(3) - 1;
}
#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "Scattered target square (%d, %d)", pos.x, pos.y);
+ mprf(MSGCH_DIAGNOSTICS,
+ "Scattered target square (%d, %d)", pos.x, pos.y);
#endif
}
@@ -1729,7 +1732,8 @@ bool you_teleport_to (const coord_def where_to, bool move_monsters)
monsters *mons = monster_at(where);
mons->teleport(true);
}
- else {
+ else
+ {
for (adjacent_iterator ai(where); ai; ++ai)
{
if (!_cell_vetoes_teleport(*ai))
@@ -1739,7 +1743,7 @@ bool you_teleport_to (const coord_def where_to, bool move_monsters)
}
else
{
- if (monster_at(*ai) && move_monsters
+ if (monster_at(*ai) && move_monsters
&& !_cell_vetoes_teleport(*ai, false))
{
monsters *mons = monster_at(*ai);
@@ -1769,7 +1773,7 @@ bool you_teleport_to (const coord_def where_to, bool move_monsters)
void you_teleport_now(bool allow_control, bool new_abyss_area, bool wizard_tele)
{
- const bool randtele = _teleport_player(allow_control, new_abyss_area,
+ const bool randtele = _teleport_player(allow_control, new_abyss_area,
wizard_tele);
// Xom is amused by uncontrolled teleports that land you in a