From 3e60b02d50e0334512ebe9375ae1fd9061c128c2 Mon Sep 17 00:00:00 2001 From: ephphatha Date: Sun, 12 Jun 2022 11:20:21 +1000 Subject: [PATCH] Move the staff skip bugfix out of PlaceMiniSet This makes the code more similar to other drlg routines so they can be combined more easily. --- Source/drlg_l4.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Source/drlg_l4.cpp b/Source/drlg_l4.cpp index afad4f5c8..6c5dd2187 100644 --- a/Source/drlg_l4.cpp +++ b/Source/drlg_l4.cpp @@ -194,9 +194,6 @@ bool PlaceMiniSet(const Miniset &miniset, bool setview) miniset.place({ sx, sy }, true); - if (currlevel == 15 && Quests[Q_BETRAYER]._qactive >= QUEST_ACTIVE) { /// Lazarus staff skip bug fixed - Quests[Q_BETRAYER].position = { sx + 1, sy + 1 }; - } if (setview) { ViewPosition = Point { 21, 22 } + Displacement { sx, sy } * 2; } @@ -1341,11 +1338,12 @@ void GenerateLevel(lvl_entry entry) if (currlevel == 15) { for (int j = 0; j < DMAXY; j++) { for (int i = 0; i < DMAXX; i++) { - if (dungeon[i][j] == 98) { - Make_SetPC(i - 1, j - 1, 5, 5); - } - if (dungeon[i][j] == 107) { + if (IsAnyOf(dungeon[i][j], 98, 107)) { Make_SetPC(i - 1, j - 1, 5, 5); + if (Quests[Q_BETRAYER]._qactive >= QUEST_ACTIVE) { /// Lazarus staff skip bug fixed + // Set the portal position to the location of the northmost pentagram tile. + Quests[Q_BETRAYER].position = { i, j }; + } } } }