mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-05 19:01:11 +00:00
G_FindMap: Support menuttl as well
Permits "map brakes" and "map balconies" Secretly just uses the titlecard map name behind the scenes, but the author of this commit didn't want to be too intrusive.
This commit is contained in:
parent
ce93667fce
commit
b55b17ccee
1 changed files with 33 additions and 4 deletions
37
src/g_game.c
37
src/g_game.c
|
|
@ -5982,7 +5982,9 @@ INT32 G_FindMap(const char *mapname, char **foundmapnamep,
|
|||
aprop = realmapname;
|
||||
|
||||
/* Now that we found a perfect match no need to fucking guess. */
|
||||
if (strnicmp(realmapname, mapname, mapnamelen) == 0)
|
||||
if (strnicmp(realmapname, mapname, mapnamelen) == 0
|
||||
|| (mapheaderinfo[i]->menuttl[0]
|
||||
&& strnicmp(mapheaderinfo[i]->menuttl, mapname, mapnamelen) == 0))
|
||||
{
|
||||
if (wanttable)
|
||||
{
|
||||
|
|
@ -6016,15 +6018,42 @@ INT32 G_FindMap(const char *mapname, char **foundmapnamep,
|
|||
realmapname = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (mapheaderinfo[i]->menuttl[0] && ( aprop = strcasestr(mapheaderinfo[i]->menuttl, mapname) ))
|
||||
{
|
||||
if (wanttable)
|
||||
{
|
||||
writesimplefreq(freq, &freqc,
|
||||
mapnum, aprop - mapheaderinfo[i]->menuttl, mapnamelen);
|
||||
}
|
||||
if (apromapnum == 0)
|
||||
{
|
||||
apromapnum = mapnum;
|
||||
apromapname = realmapname;
|
||||
realmapname = 0;
|
||||
}
|
||||
}
|
||||
else/* ...match individual keywords */
|
||||
{
|
||||
freq[freqc].mapnum = mapnum;
|
||||
measurekeywords(&freq[freqc],
|
||||
&freq[freqc].matchd, &freq[freqc].matchc,
|
||||
realmapname, mapname, wanttable);
|
||||
measurekeywords(&freq[freqc],
|
||||
&freq[freqc].keywhd, &freq[freqc].keywhc,
|
||||
mapheaderinfo[i]->keywords, mapname, wanttable);
|
||||
|
||||
if (mapheaderinfo[i]->menuttl[0])
|
||||
{
|
||||
measurekeywords(&freq[freqc],
|
||||
&freq[freqc].keywhd, &freq[freqc].keywhc,
|
||||
mapheaderinfo[i]->menuttl, mapname, wanttable);
|
||||
}
|
||||
|
||||
if (mapheaderinfo[i]->keywords[0])
|
||||
{
|
||||
measurekeywords(&freq[freqc],
|
||||
&freq[freqc].keywhd, &freq[freqc].keywhc,
|
||||
mapheaderinfo[i]->keywords, mapname, wanttable);
|
||||
}
|
||||
|
||||
if (freq[freqc].total)
|
||||
freqc++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue