From 90b75247069fc058306ac345442cdc5ee1679b98 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 24 Aug 2021 09:57:36 +0200 Subject: [PATCH] - SW: fixed episode indexing resulting in bad display on the automap. --- source/games/sw/src/scrip2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/games/sw/src/scrip2.cpp b/source/games/sw/src/scrip2.cpp index 5f316c9fa..e73d93dae 100644 --- a/source/games/sw/src/scrip2.cpp +++ b/source/games/sw/src/scrip2.cpp @@ -509,7 +509,7 @@ void LoadCustomInfoFromScript(const char *filename) curep = sc.Number; if (sc.ParseError) curep = -1; - else if ((unsigned)--curep >= 2u) + else if ((unsigned)curep > 2u) { sc.ScriptMessage("Episode number %d not in range 1-2\n", curep + 1); curep = -1; @@ -808,8 +808,8 @@ void LoadCustomInfoFromScript(const char *filename) break; } } - auto vol0 = MustFindVolume(0); - auto vol1 = MustFindVolume(1); + auto vol0 = MustFindVolume(1); + auto vol1 = MustFindVolume(2); auto map1 = FindMapByLevelNum(1); auto map5 = FindMapByLevelNum(5); if (vol0 && map1) vol0->startmap = map1->labelName;