Fix M_GetLevelEmblems to work with gamemap index (as it was used for) instead of mapheaderinfo index

This commit is contained in:
toaster 2022-12-13 22:11:07 +00:00
parent dbb96dabd6
commit 0e8c739efc

View file

@ -1301,7 +1301,7 @@ emblem_t *M_GetLevelEmblems(INT32 mapnum)
if (mapnum > 0)
{
map = mapnum;
map = mapnum-1;
i = numemblems;
}
@ -1312,8 +1312,10 @@ emblem_t *M_GetLevelEmblems(INT32 mapnum)
if (checkLevel >= nummapheaders || !mapheaderinfo[checkLevel])
continue;
if (checkLevel == map)
return &emblemlocations[i];
if (checkLevel != map)
continue;
return &emblemlocations[i];
}
return NULL;
}