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 /crawl-ref/source/tile2.cc | |
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
Diffstat (limited to 'crawl-ref/source/tile2.cc')
-rw-r--r-- | crawl-ref/source/tile2.cc | 8 |
1 files changed, 6 insertions, 2 deletions
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; |