summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-30 20:43:15 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-30 20:43:15 +0000
commitf116902db8e7f917df91a3a1e775cc43cf7dd47a (patch)
tree8ce9e5477928410e415ac3244babeed341a40f09 /crawl-ref/source/misc.cc
parenta932874b76f5657f943d879c2a0b36dab2cc3f68 (diff)
downloadcrawl-ref-f116902db8e7f917df91a3a1e775cc43cf7dd47a.tar.gz
crawl-ref-f116902db8e7f917df91a3a1e775cc43cf7dd47a.zip
Fix 1921769: Exclusion squares on the tiles minimap sometimes
not being updated. Also add yet another minimap colour option for the centre of an exclusion (defaults to darkblue). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3958 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc29
1 files changed, 17 insertions, 12 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 1b4a9c1cc1..90f3d53e9e 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -911,8 +911,10 @@ void up_stairs(dungeon_feature_type force_stair,
exit_stair_message(stair_find, true);
if (old_where != you.where_are_you && you.level_type == LEVEL_DUNGEON)
+ {
mprf("Welcome back to %s!",
branches[you.where_are_you].longname);
+ }
#ifdef USE_TILE
const bool newlevel =
@@ -925,10 +927,6 @@ void up_stairs(dungeon_feature_type force_stair,
you.turn_is_over = true;
-#ifdef USE_TILE
- TileNewLevel(newlevel);
-#endif // USE_TILE
-
save_game_state();
new_level();
@@ -956,6 +954,10 @@ void up_stairs(dungeon_feature_type force_stair,
// Tell stash-tracker and travel that we've changed levels.
trackers_init_new_level(true);
+#ifdef USE_TILE
+ TileNewLevel(newlevel);
+#endif // USE_TILE
+
if (collect_travel_data)
{
// Update stair information for the stairs we just ascended, and the
@@ -986,8 +988,8 @@ void up_stairs(dungeon_feature_type force_stair,
// to Hell as shortcuts between dungeon levels, which won't work,
// and will confuse the dickens out of the player (well, it confused
// the dickens out of me when it happened).
- if (new_level_id.branch == BRANCH_MAIN_DUNGEON &&
- old_level_id.branch == BRANCH_VESTIBULE_OF_HELL)
+ if (new_level_id.branch == BRANCH_MAIN_DUNGEON
+ && old_level_id.branch == BRANCH_VESTIBULE_OF_HELL)
{
lp.id.depth = -1;
lp.pos.x = lp.pos.y = -1;
@@ -1019,7 +1021,7 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
entry_cause_type entry_cause )
{
int i;
- const level_area_type old_level_type = you.level_type;
+ const level_area_type old_level_type = you.level_type;
const dungeon_feature_type stair_find =
force_stair? force_stair : grd[you.x_pos][you.y_pos];
@@ -1425,7 +1427,9 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
you.your_level++;
else if (level_type_exits_down(you.level_type)
&& !level_type_exits_down(old_level_type))
+ {
you.your_level--;
+ }
switch (you.level_type)
@@ -1469,10 +1473,6 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
break;
}
-#ifdef USE_TILE
- TileNewLevel(newlevel);
-#endif
-
you.turn_is_over = true;
save_game_state();
@@ -1492,6 +1492,11 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
mpr( "You sense a powerful magical force warping space.", MSGCH_WARN );
trackers_init_new_level(true);
+
+#ifdef USE_TILE
+ TileNewLevel(newlevel);
+#endif // USE_TILE
+
if (collect_travel_data)
{
// Update stair information for the stairs we just descended, and the
@@ -1506,7 +1511,7 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
// First we update the old level's stair.
level_pos lp;
- lp.id = new_level_id;
+ lp.id = new_level_id;
lp.pos.x = you.x_pos;
lp.pos.y = you.y_pos;