Skip to content
Snippets Groups Projects
Commit 17801d52 authored by toaster's avatar toaster
Browse files

Emeraldnum and playcredits can only be set when initialising a new gamedata

parent 9252ea18
No related branches found
No related tags found
No related merge requests found
......@@ -4086,16 +4086,30 @@ void readcupheader(MYFILE *f, cupheader_t *cup)
cup->cachedlevels[CUPCACHE_PODIUM] = NEXTMAP_INVALID;
}
else if (fastcmp(word, "EMERALDNUM"))
{
if (!mainwads || (refreshdirmenu & REFRESHDIR_GAMEDATA))
{
if (i >= 0 && i <= 14)
cup->emeraldnum = (UINT8)i;
else
deh_warning("%s Cup: invalid emerald number %d", cup->name, i);
}
else
{
deh_warning("You must define a custom gamedata to use \"%s\"", word);
}
}
else if (fastcmp(word, "PLAYCREDITS"))
{
if (!mainwads || (refreshdirmenu & REFRESHDIR_GAMEDATA))
{
cup->playcredits = (i != 0 || word2[0] == 'T' || word2[0] == 'Y');
}
else
{
deh_warning("You must define a custom gamedata to use \"%s\"", word);
}
}
else
deh_warning("%s Cup: unknown word '%s'", cup->name, word);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment