Commit MetaInfo

Revisionee12a70c0d7c8b6f68ec3a8b26448de7a1194d46 (tree)
Time2021-06-02 13:23:58
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

The name of the server and the current game mode are now shown on the scoreboard's header.

Change Summary

Incremental Difference

diff -r c66e64b0aaef -r ee12a70c0d7c src/scoreboard.cpp
--- a/src/scoreboard.cpp Sun Jun 06 22:57:51 2021 +0200
+++ b/src/scoreboard.cpp Wed Jun 02 00:23:58 2021 -0400
@@ -1627,7 +1627,18 @@
16271627 if ( gamestate == GS_LEVEL )
16281628 HUD_DrawTextCentered( BigFont, CR_RED, g_ulCurYPos, "RANKINGS", g_bScale );
16291629
1630- g_ulCurYPos += 22;
1630+ g_ulCurYPos += 18;
1631+
1632+ // [AK] Draw the name of the server if we're in an online game.
1633+ if ( NETWORK_InClientMode( ))
1634+ {
1635+ HUD_DrawTextCentered( SmallFont, CR_GREY, g_ulCurYPos, sv_hostname, g_bScale );
1636+ g_ulCurYPos += 10;
1637+ }
1638+
1639+ // [AK] Draw the name of the current game mode.
1640+ HUD_DrawTextCentered( SmallFont, CR_GOLD, g_ulCurYPos, GAMEMODE_GetName( GAMEMODE_GetCurrentMode( )), g_bScale );
1641+ g_ulCurYPos += 10;
16311642
16321643 // Draw the time, frags, points, or kills we have left until the level ends.
16331644 if ( gamestate == GS_LEVEL )
diff -r c66e64b0aaef -r ee12a70c0d7c src/sv_main.cpp
--- a/src/sv_main.cpp Sun Jun 06 22:57:51 2021 +0200
+++ b/src/sv_main.cpp Wed Jun 02 00:23:58 2021 -0400
@@ -1304,6 +1304,9 @@
13041304 // Send consoleplayer number.
13051305 SERVERCOMMANDS_SetConsolePlayer( g_lCurrentClient );
13061306
1307+ // [AK] Send the name of the server.
1308+ SERVERCOMMANDS_SetCVar( sv_hostname, g_lCurrentClient, SVCF_ONLYTHISCLIENT );
1309+
13071310 // Send dmflags.
13081311 SERVERCOMMANDS_SetGameDMFlags( g_lCurrentClient, SVCF_ONLYTHISCLIENT );
13091312
Show on old repository browser