# HG changeset patch # User Adam Kaminski # Date 1612711038 18000 # Sun Feb 07 10:17:18 2021 -0500 # Node ID c59208acfa97ad95b25b194d4885cf2487c1e6a1 # Parent ebbb6a7cd17df6ea37c213ebaf662e9d5ff3122e The "map" and "changemap" votes now show the full name of the level in addition to the lump name. diff -r ebbb6a7cd17d -r c59208acfa97 src/callvote.cpp --- a/src/callvote.cpp Fri Jan 15 19:24:07 2021 -0500 +++ b/src/callvote.cpp Sun Feb 07 10:17:18 2021 -0500 @@ -473,7 +473,23 @@ // const char *CALLVOTE_GetCommand( void ) { - return ( g_VoteCommand.GetChars( )); + FString command = g_VoteCommand.GetChars(); + level_info_t *pLevel = NULL; + + // [AK] If this is a map or changemap vote, get the level we're changing to. + if ( strncmp( command.GetChars(), "map", 3 ) == 0 ) + pLevel = FindLevelByName( command.GetChars() + 4 ); + else if ( strncmp( command.GetChars(), "changemap", 9 ) == 0 ) + pLevel = FindLevelByName( command.GetChars() + 10 ); + + // [AK] Append the full name of the map if valid. + if ( pLevel != NULL ) + { + FString levelName = pLevel->LookupLevelName(); + command.AppendFormat( " - %s", levelName.GetChars() ); + } + + return ( command.GetChars( )); } //*****************************************************************************