• R/O
  • SSH

zandronum-sandbox-stable: Commit


Commit MetaInfo

Revisiónbbfcb1b52fd640d9c8b151dd18f09b32784b13af (tree)
Tiempo2022-09-27 22:02:35
AutorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

The "maplist" CCMD now also prints "current" or "used" alongside green or red text for map entries that are currently being played or used. This change is particularly useful for consoles or logfiles that strip color codes and couldn't show the colored text.

Cambiar Resumen

Diferencia incremental

diff -r 457591ba7b0e -r bbfcb1b52fd6 docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sun Sep 25 16:56:20 2022 -0400
+++ b/docs/zandronum-history.txt Tue Sep 27 09:02:35 2022 -0400
@@ -97,6 +97,7 @@
9797 ! - gl_texture is now forced to be true when sv_forcevideodefaults is true. [Kaminsky]
9898 ! - cl_identifytarget now prints "ally" if the target is a teammate of the player being spied on, instead of the local player. Also, it now always prints a player's skin with their current class, if unmorphed. If cl_skins is 0, then the skin is always printed as "base" instead. [Kaminsky]
9999 ! - The GAMEMODE lump now accepts a wider range of gameplay-related CVars that aren't limited to flags. Strictly speaking, any CVars with the CVAR_GAMEPLAYSETTING bit, or any flags whose flagset has the CVAR_GAMEPLAYFLAGSET (previously named CVAR_GAMEMODELOCK) bit. [Kaminsky]
100+! - The "maplist" CCMD now also prints "current" or "used" alongside green or red text for map entries that are currently being played or used. This change is particularly useful for consoles or logfiles that strip color codes and couldn't show the colored text. [Kaminsky]
100101
101102
102103 3.1
diff -r 457591ba7b0e -r bbfcb1b52fd6 src/maprotation.cpp
--- a/src/maprotation.cpp Sun Sep 25 16:56:20 2022 -0400
+++ b/src/maprotation.cpp Tue Sep 27 09:02:35 2022 -0400
@@ -523,14 +523,22 @@
523523 Printf( "Map rotation list: \n" );
524524 for ( ULONG ulIdx = 0; ulIdx < g_MapRotationEntries.size( ); ulIdx++ )
525525 {
526- message.Format( "%lu. %s - %s", ulIdx + 1, g_MapRotationEntries[ulIdx].pMap->mapname, g_MapRotationEntries[ulIdx].pMap->LookupLevelName( ).GetChars( ));
526+ message.Format( "%lu. ", ulIdx + 1 );
527527
528528 // [AK] Highlight the current position in the map rotation in green, but only if we're actually playing on that map.
529529 // Otherwise, maps that have already been played will be highlighted in red.
530530 if (( g_ulCurMapInList == ulIdx ) && ( stricmp( level.mapname, g_MapRotationEntries[g_ulCurMapInList].pMap->mapname ) == 0 ))
531+ {
531532 message.Insert( 0, TEXTCOLOR_GREEN );
533+ message += "(Current) ";
534+ }
532535 else if ( g_MapRotationEntries[ulIdx].bUsed )
536+ {
533537 message.Insert( 0, TEXTCOLOR_RED );
538+ message += "(Used) ";
539+ }
540+
541+ message.AppendFormat( "%s - %s", g_MapRotationEntries[ulIdx].pMap->mapname, g_MapRotationEntries[ulIdx].pMap->LookupLevelName( ).GetChars( ));
534542
535543 // [AK] Also print the min and max player limits if they're different from the default values.
536544 if (( g_MapRotationEntries[ulIdx].ulMinPlayers > 0 ) || ( g_MapRotationEntries[ulIdx].ulMaxPlayers < MAXPLAYERS ))
Show on old repository browser