mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
First steps to making battle maps cup-based.
* Permit a map existing in multiple cups, rather than I_Error
- The reason we didn't permit this before was because of marathon plans/advancemap next.
- To that end, in that progression type, a map is only considered in its first valid cup.
This commit is contained in:
parent
5ffcfb558f
commit
5f9854e898
3 changed files with 13 additions and 6 deletions
|
|
@ -3078,6 +3078,7 @@ void readcupheader(MYFILE *f, cupheader_t *cup)
|
|||
if (cup->cachedlevels[cup->numlevels] == NEXTMAP_INVALID)
|
||||
continue;
|
||||
mapheaderinfo[cup->cachedlevels[cup->numlevels]]->cup = NULL;
|
||||
cup->cachedlevels[cup->numlevels] = NEXTMAP_INVALID;
|
||||
}
|
||||
|
||||
tmp = strtok(word2,",");
|
||||
|
|
@ -3100,6 +3101,10 @@ void readcupheader(MYFILE *f, cupheader_t *cup)
|
|||
cup->numbonus--;
|
||||
Z_Free(cup->levellist[CUPCACHE_BONUS + cup->numbonus]);
|
||||
cup->levellist[CUPCACHE_BONUS + cup->numbonus] = NULL;
|
||||
if (cup->cachedlevels[CUPCACHE_BONUS + cup->numbonus] == NEXTMAP_INVALID)
|
||||
continue;
|
||||
mapheaderinfo[cup->cachedlevels[CUPCACHE_BONUS + cup->numbonus]]->cup = NULL;
|
||||
cup->cachedlevels[CUPCACHE_BONUS + cup->numbonus] = NEXTMAP_INVALID;
|
||||
}
|
||||
|
||||
tmp = strtok(word2,",");
|
||||
|
|
|
|||
|
|
@ -3891,6 +3891,12 @@ static void G_GetNextMap(void)
|
|||
|| (!marathonmode && M_MapLocked(cm+1)))
|
||||
continue;
|
||||
|
||||
// If the map is in multiple cups, only consider the first one valid.
|
||||
if (mapheaderinfo[cm]->cup != cup)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Grab the first valid after the map you're on
|
||||
if (gettingresult)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7794,13 +7794,9 @@ UINT8 P_InitMapData(boolean existingmapheaders)
|
|||
if (strcasecmp(cup->levellist[j], name) != 0)
|
||||
continue;
|
||||
|
||||
// Only panic about back-reference for non-bonus material.
|
||||
if (j < MAXLEVELLIST)
|
||||
{
|
||||
if (mapheaderinfo[i]->cup)
|
||||
I_Error("P_InitMapData: Map %s cannot appear in cups multiple times! (First in %s, now in %s)", name, mapheaderinfo[i]->cup->name, cup->name);
|
||||
// Have a map recognise the first cup it's a part of.
|
||||
if (!mapheaderinfo[i]->cup)
|
||||
mapheaderinfo[i]->cup = cup;
|
||||
}
|
||||
|
||||
cup->cachedlevels[j] = i;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue