From bc6a2c43ad0e6c23ea92d873a8e5efa9670660f9 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 8 Jun 2008 16:35:34 +0000 Subject: Add more miscellaneous minor fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5596 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells3.cc | 21 +++++++-------------- crawl-ref/source/spells3.h | 2 +- 2 files changed, 8 insertions(+), 15 deletions(-) (limited to 'crawl-ref') 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} -- cgit v1.2.3-54-g00ecf