From 0fddfe493185587023af46c98cb5bacb413f1cb1 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 6 Jul 2001 17:38:17 +0000 Subject: [PATCH] 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). --- nq/source/host_cmd.c | 5 +++++ qw/source/sv_ccmds.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/nq/source/host_cmd.c b/nq/source/host_cmd.c index df8991738..822ada586 100644 --- a/nq/source/host_cmd.c +++ b/nq/source/host_cmd.c @@ -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 (); diff --git a/qw/source/sv_ccmds.c b/qw/source/sv_ccmds.c index 5459d551d..bde33fa09 100644 --- a/qw/source/sv_ccmds.c +++ b/qw/source/sv_ccmds.c @@ -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 : 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;