mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Replace more instances of M_MapNumber in SOC
This commit is contained in:
parent
2520b87f76
commit
6cda446f91
1 changed files with 7 additions and 11 deletions
|
|
@ -2140,13 +2140,13 @@ static void readcupheader(MYFILE *f, cupheader_t *cup)
|
||||||
|
|
||||||
tmp = strtok(word2,",");
|
tmp = strtok(word2,",");
|
||||||
do {
|
do {
|
||||||
INT32 map = atoi(tmp);
|
INT32 map = G_MapNumber(tmp);
|
||||||
|
|
||||||
if (tmp[0] >= 'A' && tmp[0] <= 'Z' && tmp[2] == '\0')
|
if (map >= nummapheaders)
|
||||||
map = M_MapNumber(tmp[0], tmp[1]);
|
{
|
||||||
|
deh_warning("Unknown map name '%s'\n", tmp);
|
||||||
if (!map)
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (cup->numlevels >= MAXLEVELLIST)
|
if (cup->numlevels >= MAXLEVELLIST)
|
||||||
{
|
{
|
||||||
|
|
@ -2161,16 +2161,12 @@ static void readcupheader(MYFILE *f, cupheader_t *cup)
|
||||||
else if (fastcmp(word, "BONUSGAME"))
|
else if (fastcmp(word, "BONUSGAME"))
|
||||||
{
|
{
|
||||||
// Convert to map number
|
// Convert to map number
|
||||||
if (word2[0] >= 'A' && word2[0] <= 'Z' && word2[2] == '\0')
|
cup->bonusgame = (INT16)G_MapNumber(word2) - 1;
|
||||||
i = M_MapNumber(word2[0], word2[1]);
|
|
||||||
cup->bonusgame = (INT16)i - 1;
|
|
||||||
}
|
}
|
||||||
else if (fastcmp(word, "SPECIALSTAGE"))
|
else if (fastcmp(word, "SPECIALSTAGE"))
|
||||||
{
|
{
|
||||||
// Convert to map number
|
// Convert to map number
|
||||||
if (word2[0] >= 'A' && word2[0] <= 'Z' && word2[2] == '\0')
|
cup->specialstage = (INT16)G_MapNumber(word2) - 1;
|
||||||
i = M_MapNumber(word2[0], word2[1]);
|
|
||||||
cup->specialstage = (INT16)i - 1;
|
|
||||||
}
|
}
|
||||||
else if (fastcmp(word, "EMERALDNUM"))
|
else if (fastcmp(word, "EMERALDNUM"))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue