Warn if gametype number is out of range to map command
(cherry picked from commit 6ffb18c4b157f9efecec6a104ef930dd71f8b986)
This commit is contained in:
1 parent
401f30f27d
commit
e5fa66a2a9
1 file changed
+11
@@ -2672,6 +2672,17 @@ static void Command_Map_f(void)
|
||||
d = atoi(gametypename);
|
||||
if (d >= 0 && d < NUMGAMETYPES)
|
||||
newgametype = d;
|
||||
else
|
||||
{
|
||||
CONS_Alert(CONS_ERROR,
|
||||
"Gametype number %d is out of range. Use a number between"
|
||||
" 0 and %d inclusive. ...Or just use the name. :v\n",
|
||||
d,
|
||||
NUMGAMETYPES-1);
|
||||
Z_Free(realmapname);
|
||||
Z_Free(mapname);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user