summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/spells3.cc21
-rw-r--r--crawl-ref/source/spells3.h2
2 files changed, 8 insertions, 15 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 5ea049c087..ef0d72dee7 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -473,22 +473,17 @@ void simulacrum(int power)
// This function returns true if the player can use controlled teleport
// here.
-bool allow_control_teleport( bool silent )
+bool allow_control_teleport(bool quiet)
{
- bool ret = true;
-
- if (testbits(env.level_flags, LFLAG_NO_TELE_CONTROL)
- || testbits(get_branch_flags(), BFLAG_NO_TELE_CONTROL))
- {
- ret = false;
- }
+ bool retval = !(testbits(env.level_flags, LFLAG_NO_TELE_CONTROL)
+ || testbits(get_branch_flags(), BFLAG_NO_TELE_CONTROL));
// Tell the player why if they have teleport control.
- if (!ret && player_control_teleport() && !silent)
+ if (!quiet && !retval && player_control_teleport())
mpr("A powerful magic prevents control of your teleportation.");
- return ret;
-} // end allow_control_teleport()
+ return retval;
+}
void you_teleport(void)
{
@@ -511,9 +506,7 @@ void you_teleport(void)
you.duration[DUR_TELEPORT] += 5 + random2(10);
}
}
-
- return;
-} // end you_teleport()
+}
static bool _teleport_player( bool allow_control, bool new_abyss_area )
{
diff --git a/crawl-ref/source/spells3.h b/crawl-ref/source/spells3.h
index ce74a6a4b8..3c8b4bdcfc 100644
--- a/crawl-ref/source/spells3.h
+++ b/crawl-ref/source/spells3.h
@@ -22,7 +22,7 @@ struct bolt;
/* ***********************************************************************
* called from: spells1 - spells3
* *********************************************************************** */
-bool allow_control_teleport( bool silent = false );
+bool allow_control_teleport(bool quiet = false);
// updated 24may2000 {dlb}