From b25b6a1daa2bd08121c76d16a65dc6629facd245 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 16 Jul 2023 20:00:40 +0200 Subject: [PATCH] Fix spawn location when using map debug command --- Source/quests.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/quests.cpp b/Source/quests.cpp index 5ba5a67c6..b8b27c7f0 100644 --- a/Source/quests.cpp +++ b/Source/quests.cpp @@ -31,6 +31,10 @@ #include "utils/language.h" #include "utils/utf8.hpp" +#ifdef _DEBUG +#include "debug.h" +#endif + namespace devilution { bool QuestLogIsOpen; @@ -521,6 +525,11 @@ int GetMapReturnLevel() Point GetMapReturnPosition() { +#ifdef _DEBUG + if (!TestMapPath.empty()) + return ViewPosition; +#endif + switch (setlvlnum) { case SL_SKELKING: return Quests[Q_SKELKING].position + Direction::SouthEast;