diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-08 16:35:34 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-08 16:35:34 +0000 |
commit | bc6a2c43ad0e6c23ea92d873a8e5efa9670660f9 (patch) | |
tree | 270185c947e476e51cf52e89f4e2ef6e10bce66e /crawl-ref/source/spells3.cc | |
parent | 8bc24807373e07c83b31c7152c5fef820e51c325 (diff) | |
download | crawl-ref-bc6a2c43ad0e6c23ea92d873a8e5efa9670660f9.tar.gz crawl-ref-bc6a2c43ad0e6c23ea92d873a8e5efa9670660f9.zip |
Add more miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5596 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r-- | crawl-ref/source/spells3.cc | 21 |
1 files changed, 7 insertions, 14 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 ) { |