summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-02 17:31:31 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-02 17:31:31 +0000
commit1826273cc56b745d81621bb8b44ba0efd0d95c15 (patch)
tree24d2e0198719f653e99c37378f669fa9b982506a /crawl-ref/source/misc.cc
parent9548119ecb3949f1df7d8bb39372e9fd5b656690 (diff)
downloadcrawl-ref-1826273cc56b745d81621bb8b44ba0efd0d95c15.tar.gz
crawl-ref-1826273cc56b745d81621bb8b44ba0efd0d95c15.zip
Fixed Abyss banishment crash.
Don't show -more- after the "cast into the Abyss" so that players on public servers are not tempted to kill the tty to escape the banishment. It's still possible that there are enough messages in view that the game puts in a -more- unasked for, but I'll live with that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@769 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 8c74a2efd8..58d48b64a5 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -729,14 +729,14 @@ void up_stairs(void)
}
} // end up_stairs()
-void down_stairs( bool remove_stairs, int old_level, bool force )
+void down_stairs( bool remove_stairs, int old_level, int force_stair )
{
int i;
char old_level_type = you.level_type;
bool was_a_labyrinth = false;
- const unsigned char stair_find = grd[you.x_pos][you.y_pos];
+ const int stair_find =
+ force_stair? force_stair : grd[you.x_pos][you.y_pos];
- //int old_level = you.your_level;
bool leave_abyss_pan = false;
char old_where = you.where_are_you;
@@ -777,7 +777,7 @@ void down_stairs( bool remove_stairs, int old_level, bool force )
return;
}
- if (!force && player_is_levitating()
+ if (!force_stair && player_is_levitating()
&& !wearing_amulet(AMU_CONTROLLED_FLIGHT))
{
mpr("You're floating high up above the floor!");
@@ -841,7 +841,8 @@ void down_stairs( bool remove_stairs, int old_level, bool force )
you.level_type = LEVEL_DUNGEON;
}
- mpr("Entering...");
+ if (!force_stair)
+ mpr("Entering...");
you.prev_targ = MHITNOT;
you.pet_target = MHITNOT;
@@ -854,7 +855,7 @@ void down_stairs( bool remove_stairs, int old_level, bool force )
mpr("Please enjoy your stay.");
// Kill -more- prompt if we're traveling.
- if (!you.running)
+ if (!you.running && !force_stair)
more();
you.your_level = 26;
@@ -902,8 +903,7 @@ void down_stairs( bool remove_stairs, int old_level, bool force )
true, false );
#if DEBUG_DIAGNOSTICS
snprintf( info, INFO_SIZE, "Deleting: %s", lname.c_str() );
- mpr( info, MSGCH_DIAGNOSTICS );
- more();
+ mpr( info, MSGCH_DIAGNOSTICS );
#endif
unlink(lname.c_str());
}
@@ -950,7 +950,8 @@ void down_stairs( bool remove_stairs, int old_level, bool force )
break;
case LEVEL_ABYSS:
- mpr("You enter the Abyss!");
+ if (!force_stair)
+ mpr("You enter the Abyss!");
mpr("To return, you must find a gate leading back.");
break;