From 43edea4a373687d8abc1a646b47336622a0165a7 Mon Sep 17 00:00:00 2001 From: Eric Robinson Date: Sat, 6 Dec 2025 17:06:53 -0500 Subject: [PATCH] Fix NaKrul book sequence --- Source/diablo.cpp | 1 + Source/objects.cpp | 4 +--- Source/objects.h | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index f006b2a53..4f51b7a76 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -3356,6 +3356,7 @@ tl::expected LoadGameLevel(bool firstflag, lvl_entry lvldir) LoadGameLevelStopMusic(neededTrack); LoadGameLevelResetCursor(); SetRndSeedForDungeonLevel(); + NaKrulTomeSequence = 0; IncProgress(); diff --git a/Source/objects.cpp b/Source/objects.cpp index 16cbeb765..859c7374b 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -58,6 +58,7 @@ int AvailableObjects[MAXOBJECTS]; int ActiveObjects[MAXOBJECTS]; int ActiveObjectCount; bool LoadingMapObjects; +int NaKrulTomeSequence; namespace { @@ -115,9 +116,6 @@ object_graphic_id ObjFileList[40]; int leverid; int numobjfiles; -/** Tracks progress through the tome sequence that spawns Na-Krul (see OperateNakrulBook()) */ -int NaKrulTomeSequence; - /** Specifies the X-coordinate delta between barrels. */ int bxadd[8] = { -1, 0, 1, -1, 1, -1, 0, 1 }; /** Specifies the Y-coordinate delta between barrels. */ diff --git a/Source/objects.h b/Source/objects.h index b9b4dd3d5..b7c20c5e8 100644 --- a/Source/objects.h +++ b/Source/objects.h @@ -287,6 +287,8 @@ extern int ActiveObjects[MAXOBJECTS]; extern int ActiveObjectCount; /** @brief Indicates that objects are being loaded during gameplay and pre calculated data should be updated. */ extern bool LoadingMapObjects; +/** Tracks progress through the tome sequence that spawns Na-Krul (see OperateNakrulBook()) */ +extern int NaKrulTomeSequence; /** * @brief Find an object given a point in map coordinates