Skip to content

Commit

Permalink
fixed tile crash bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kimjoy2002 committed Oct 5, 2020
1 parent d9834b3 commit f533da3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crawl-ref/source/dungeon-feature-type.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ enum dungeon_feature_type
DNGN_ENTER_VOLCANO,
DNGN_ENTER_WIZLAB,
DNGN_ENTER_DESOLATION,
DNGN_ENTER_GOLEM,

DNGN_EXIT_ZIGGURAT,
DNGN_EXIT_BAZAAR,
Expand All @@ -265,7 +264,6 @@ enum dungeon_feature_type
DNGN_EXIT_LABYRINTH,
#endif
DNGN_EXIT_DESOLATION,
DNGN_EXIT_GOLEM,
#if TAG_MAJOR_VERSION == 34

DNGN_ALTAR_GOZAG,
Expand Down Expand Up @@ -297,6 +295,8 @@ enum dungeon_feature_type
DNGN_ALTAR_AGRAPHEDE,
#endif
DNGN_TEMPORAL_FLOOR,
DNGN_ENTER_GOLEM,
DNGN_EXIT_GOLEM,

NUM_FEATURES
};
Expand Down
1 change: 1 addition & 0 deletions crawl-ref/source/tag-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ enum tag_minor_version
TAG_MINOR_PIPE, // Add pipe item
TAG_MINOR_VALOR, // Add highst charm book
TAG_MINOR_AID, // Add BOOK_AID
TAG_MINOR_GOLEM_BUG, // Add GOLEM_BUG
#endif
NUM_TAG_MINORS,
TAG_MINOR_VERSION = NUM_TAG_MINORS - 1
Expand Down
16 changes: 16 additions & 0 deletions crawl-ref/source/tags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,22 @@ static dungeon_feature_type rewrite_feature(dungeon_feature_type x,
x = DNGN_ENTER_GAUNTLET;
#endif

if (minor_version == TAG_MINOR_AID) {
//fixed force
if (x == DNGN_EXIT_ZIGGURAT) {
x = DNGN_ENTER_GOLEM;
}
else if (x == DNGN_ALTAR_QAZLAL) {
x = DNGN_EXIT_GOLEM;
}
else if (x > DNGN_ALTAR_QAZLAL) {
x = static_cast<dungeon_feature_type>(x - 2);
}
else if (x > DNGN_EXIT_ZIGGURAT) {
x = static_cast<dungeon_feature_type>(x - 1);
}
}

return x;
}

Expand Down

0 comments on commit f533da3

Please sign in to comment.