mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
M_DrawChallengePreview: Fix being able to see SECRET_MAP stages that don't have necessary mapvisited
Applies to our Round Stars AND Tutorial Challenge
This commit is contained in:
parent
55cbf07a28
commit
4fd95a3060
1 changed files with 38 additions and 9 deletions
|
|
@ -6927,18 +6927,38 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
|
||||||
}
|
}
|
||||||
case SECRET_MAP:
|
case SECRET_MAP:
|
||||||
{
|
{
|
||||||
const char *gtname = "INVALID HEADER";
|
boolean validdraw = false;
|
||||||
|
const char *gtname = "Find your prize...";
|
||||||
UINT16 mapnum = M_UnlockableMapNum(ref);
|
UINT16 mapnum = M_UnlockableMapNum(ref);
|
||||||
|
|
||||||
K_DrawMapThumbnail(
|
if (mapnum >= nummapheaders
|
||||||
(x-50)<<FRACBITS, (146+2)<<FRACBITS,
|
|| mapheaderinfo[mapnum] == NULL
|
||||||
80<<FRACBITS,
|
|| mapheaderinfo[mapnum]->menuflags & LF2_HIDEINMENU)
|
||||||
0,
|
|
||||||
mapnum,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
if (mapnum < nummapheaders && mapheaderinfo[mapnum] != NULL)
|
|
||||||
{
|
{
|
||||||
|
gtname = "INVALID HEADER";
|
||||||
|
}
|
||||||
|
else if (
|
||||||
|
( // Check for visitation
|
||||||
|
(mapheaderinfo[mapnum]->menuflags & LF2_NOVISITNEEDED)
|
||||||
|
|| (mapheaderinfo[mapnum]->records.mapvisited & MV_VISITED)
|
||||||
|
) && ( // Check for completion
|
||||||
|
!(mapheaderinfo[mapnum]->menuflags & LF2_FINISHNEEDED)
|
||||||
|
|| (mapheaderinfo[mapnum]->records.mapvisited & MV_BEATEN)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
validdraw = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (validdraw)
|
||||||
|
{
|
||||||
|
K_DrawMapThumbnail(
|
||||||
|
(x-50)<<FRACBITS, (146+2)<<FRACBITS,
|
||||||
|
80<<FRACBITS,
|
||||||
|
0,
|
||||||
|
mapnum,
|
||||||
|
NULL);
|
||||||
|
|
||||||
INT32 guessgt = G_GuessGametypeByTOL(mapheaderinfo[mapnum]->typeoflevel);
|
INT32 guessgt = G_GuessGametypeByTOL(mapheaderinfo[mapnum]->typeoflevel);
|
||||||
|
|
||||||
if (guessgt == -1)
|
if (guessgt == -1)
|
||||||
|
|
@ -6964,6 +6984,15 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
V_DrawFixedPatch(
|
||||||
|
(x-50)<<FRACBITS, (146+2)<<FRACBITS,
|
||||||
|
FRACUNIT,
|
||||||
|
0,
|
||||||
|
unvisitedlvl[challengesmenu.ticker % 4],
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
V_DrawThinString(1, BASEVIDHEIGHT-(9+3), 0, gtname);
|
V_DrawThinString(1, BASEVIDHEIGHT-(9+3), 0, gtname);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue