- fixed: The level number for a secret exit is 1-based, not 0-based as the internal map data.

Fixes #35.
This commit is contained in:
Christoph Oelckers 2020-07-26 18:13:21 +02:00
parent c8cde7fb3b
commit feffc7c5c2

View file

@ -1064,7 +1064,7 @@ bool setnextmap(bool checksecretexit)
{ {
if (ud.secretlevel > 0) if (ud.secretlevel > 0)
{ {
int newlevnum = levelnum(volfromlevelnum(currentLevel->levelNumber), ud.secretlevel); int newlevnum = levelnum(volfromlevelnum(currentLevel->levelNumber), ud.secretlevel-1);
map = FindMapByLevelNum(newlevnum); map = FindMapByLevelNum(newlevnum);
if (map) if (map)
{ {