diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-19 16:48:08 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-19 16:48:08 +0000 |
commit | fc7c7c8405540e318c7f2e97fb2aa76723d88b91 (patch) | |
tree | 39e425ab60bbdffc47e5e7536d5ca2a5bbfd42fa | |
parent | c442299402812d80fff086bbfda94d8fd547e8c3 (diff) | |
download | crawl-ref-fc7c7c8405540e318c7f2e97fb2aa76723d88b91.tar.gz crawl-ref-fc7c7c8405540e318c7f2e97fb2aa76723d88b91.zip |
[1943740] Fixing issue with odd tiles in Pan when saving and reloading.
Also, fixing misplaced viewwindow that was drawing the screen before the right tiles for that level were selected.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4376 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/misc.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/tile2.cc | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 6e24395952..211682bb46 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2236,8 +2236,6 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, you.duration[DUR_BEHELD] = 0; } - viewwindow(1, true); - if (you.skills[SK_TRANSLOCATIONS] > 0 && !allow_control_teleport( true )) mpr( "You sense a powerful magical force warping space.", MSGCH_WARN ); @@ -2247,6 +2245,8 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, TileNewLevel(newlevel); #endif // USE_TILE + viewwindow(1, true); + if (collect_travel_data) { // Update stair information for the stairs we just descended, and the diff --git a/crawl-ref/source/tile2.cc b/crawl-ref/source/tile2.cc index 5688f14d68..16b75861d5 100644 --- a/crawl-ref/source/tile2.cc +++ b/crawl-ref/source/tile2.cc @@ -917,6 +917,8 @@ static void _TileLoadWallAux(int idx_src, int idx_dst, img_type wall) void WallIdx(int &wall, int &floor, int &special) { + // Note: This function must be deterministic. + special = -1; if (you.level_type == LEVEL_PANDEMONIUM) @@ -967,9 +969,11 @@ void WallIdx(int &wall, int &floor, int &special) break; } - if (one_chance_in(3)) + unsigned int seen = you.get_place_info(LEVEL_PANDEMONIUM).levels_seen; + + if ((seen + env.rock_colour) % 3 == 1) wall = IDX_WALL_FLESH; - if (one_chance_in(3)) + if ((seen + env.floor_colour) % 3 == 1) floor = IDX_FLOOR_NERVES; return; |