mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Warn if the gametype is not valid at all!
This commit is contained in:
parent
85b6b307e8
commit
9290fa7e20
1 changed files with 16 additions and 4 deletions
|
|
@ -1905,10 +1905,22 @@ static void Command_Map_f(void)
|
||||||
|
|
||||||
if (newgametype == -1) // reached end of the list with no match
|
if (newgametype == -1) // reached end of the list with no match
|
||||||
{
|
{
|
||||||
d = atoi(gametypename);
|
/* Did they give us a gametype number? That's okay too! */
|
||||||
// assume they gave us a gametype number, which is okay too
|
if (isdigit(gametypename[0]))
|
||||||
if (d >= 0 && d < NUMGAMETYPES)
|
{
|
||||||
newgametype = d;
|
d = atoi(gametypename);
|
||||||
|
if (d >= 0 && d < NUMGAMETYPES)
|
||||||
|
newgametype = d;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_ERROR,
|
||||||
|
"'%s' is not a gametype.\n",
|
||||||
|
gametypename);
|
||||||
|
Z_Free(realmapname);
|
||||||
|
Z_Free(mapname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue