Fix bugs discovered in testing.

This commit is contained in:
toaster 2019-11-24 15:06:37 +00:00
parent f602e5bfb7
commit fd657d2ff4

View file

@ -6625,6 +6625,8 @@ static void M_HandleChecklist(INT32 choice)
continue; continue;
if (unlockables[j].conditionset > MAXCONDITIONSETS) if (unlockables[j].conditionset > MAXCONDITIONSETS)
continue; continue;
if (!unlockables[j].unlocked && unlockables[j].showconditionset && !M_Achieved(unlockables[j].showconditionset))
continue;
if (unlockables[j].conditionset == unlockables[check_on].conditionset) if (unlockables[j].conditionset == unlockables[check_on].conditionset)
continue; continue;
break; break;
@ -6648,6 +6650,8 @@ static void M_HandleChecklist(INT32 choice)
continue; continue;
if (unlockables[j].conditionset > MAXCONDITIONSETS) if (unlockables[j].conditionset > MAXCONDITIONSETS)
continue; continue;
if (!unlockables[j].unlocked && unlockables[j].showconditionset && !M_Achieved(unlockables[j].showconditionset))
continue;
if (j && unlockables[j].conditionset == unlockables[j-1].conditionset) if (j && unlockables[j].conditionset == unlockables[j-1].conditionset)
continue; continue;
break; break;
@ -6687,7 +6691,10 @@ static void M_DrawChecklist(void)
if (unlockables[i].name[0] == 0 //|| unlockables[i].nochecklist if (unlockables[i].name[0] == 0 //|| unlockables[i].nochecklist
|| !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS || !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS
|| (!unlockables[i].unlocked && unlockables[i].showconditionset && !M_Achieved(unlockables[i].showconditionset))) || (!unlockables[i].unlocked && unlockables[i].showconditionset && !M_Achieved(unlockables[i].showconditionset)))
{
i++;
continue; continue;
}
V_DrawString(currentMenu->x, y, ((unlockables[i].unlocked) ? V_GREENMAP : V_TRANSLUCENT)|V_ALLOWLOWERCASE, ((unlockables[i].unlocked || !unlockables[i].nochecklist) ? unlockables[i].name : M_CreateSecretMenuOption(unlockables[i].name))); V_DrawString(currentMenu->x, y, ((unlockables[i].unlocked) ? V_GREENMAP : V_TRANSLUCENT)|V_ALLOWLOWERCASE, ((unlockables[i].unlocked || !unlockables[i].nochecklist) ? unlockables[i].name : M_CreateSecretMenuOption(unlockables[i].name)));
@ -6709,10 +6716,11 @@ static void M_DrawChecklist(void)
if (unlockables[i].objective[0] != '/') if (unlockables[i].objective[0] != '/')
{ {
addy(8); addy(16);
V_DrawString(currentMenu->x, y, V_DrawString(currentMenu->x, y-8,
V_ALLOWLOWERCASE, V_ALLOWLOWERCASE,
va("\x1E %s", unlockables[i].objective)); va("\x1E %s", unlockables[i].objective));
y -= 8;
} }
else else
{ {