just typing map will give the current map name. In nq, doesn't work too well

during a demo (doesn't die, just gives "map is ", or likely the last map
actually played on).
This commit is contained in:
Bill Currie 2001-07-06 17:38:17 +00:00
parent 1db6225ae7
commit 0fddfe4931
2 changed files with 10 additions and 1 deletions

View file

@ -275,6 +275,11 @@ Host_Map_f (void)
if (cmd_source != src_command)
return;
if (Cmd_Argc () == 1) {
Con_Printf ("map is %s\n", sv.name);
return;
}
cls.demonum = -1; // stop demo loop in case this fails
CL_Disconnect ();

View file

@ -319,10 +319,14 @@ SV_Map_f (void)
char expanded[MAX_QPATH];
VFile *f;
if (Cmd_Argc () != 2) {
if (Cmd_Argc () > 2) {
Con_Printf ("map <levelname> : continue game on a new level\n");
return;
}
if (Cmd_Argc () == 1) {
Con_Printf ("map is %s\n", curlevel);
return;
}
strncpy (level, Cmd_Argv (1), sizeof (level) - 1);
level[sizeof (level) - 1] = 0;