mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-01-19 07:51:54 +00:00
map command without any arguments prints current map name
This commit is contained in:
parent
794d40a04c
commit
10eee1eb43
1 changed files with 7 additions and 0 deletions
|
@ -108,6 +108,13 @@ static void Session_Map_f( const idCmdArgs &args ) {
|
|||
|
||||
map = args.Argv(1);
|
||||
if ( !map.Length() ) {
|
||||
// DG: if the map command is called without any arguments, print the current map
|
||||
// TODO: could check whether we're currently in a game, otherwise the last loaded
|
||||
// map is printed.. but OTOH, who cares
|
||||
const char* curmap = sessLocal.mapSpawnData.serverInfo.GetString( "si_map" );
|
||||
if ( curmap[0] != '\0' ) {
|
||||
common->Printf( "Current Map: %s\n", curmap );
|
||||
}
|
||||
return;
|
||||
}
|
||||
map.StripFileExtension();
|
||||
|
|
Loading…
Reference in a new issue