Commit MetaInfo

Revision490f782919b31fef24b18390c02cfbe705fab2d4 (tree)
Time2021-06-02 13:48:10
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Added the function GAMEMODE_GetCurrentName.

Change Summary

Incremental Difference

diff -r ee12a70c0d7c -r 490f782919b3 src/gamemode.cpp
--- a/src/gamemode.cpp Wed Jun 02 00:23:58 2021 -0400
+++ b/src/gamemode.cpp Wed Jun 02 00:48:10 2021 -0400
@@ -409,6 +409,13 @@
409409
410410 //*****************************************************************************
411411 //
412+char *GAMEMODE_GetCurrentName( void )
413+{
414+ return ( g_GameModes[g_CurrentGameMode].szName );
415+}
416+
417+//*****************************************************************************
418+//
412419 char *GAMEMODE_GetF1Texture( GAMEMODE_e GameMode )
413420 {
414421 if ( GameMode >= NUM_GAMEMODES )
diff -r ee12a70c0d7c -r 490f782919b3 src/gamemode.h
--- a/src/gamemode.h Wed Jun 02 00:23:58 2021 -0400
+++ b/src/gamemode.h Wed Jun 02 00:48:10 2021 -0400
@@ -175,6 +175,7 @@
175175 ULONG GAMEMODE_GetCurrentFlags( void );
176176 char *GAMEMODE_GetShortName( GAMEMODE_e GameMode );
177177 char *GAMEMODE_GetName( GAMEMODE_e GameMode );
178+char *GAMEMODE_GetCurrentName( void );
178179 char *GAMEMODE_GetF1Texture( GAMEMODE_e GameMode );
179180 int GAMEMODE_GetFlagsetMask( GAMEMODE_e GameMode, FIntCVar *Flagset, bool bLocked = false );
180181 int GAMEMODE_GetCurrentFlagsetMask( FIntCVar *Flagset, bool bLocked = false );
diff -r ee12a70c0d7c -r 490f782919b3 src/p_acs.cpp
--- a/src/p_acs.cpp Wed Jun 02 00:23:58 2021 -0400
+++ b/src/p_acs.cpp Wed Jun 02 00:48:10 2021 -0400
@@ -7346,7 +7346,7 @@
73467346
73477347 case ACSF_GetCurrentGamemode:
73487348 {
7349- return GlobalACSStrings.AddString( GAMEMODE_GetName( GAMEMODE_GetCurrentMode() ));
7349+ return GlobalACSStrings.AddString( GAMEMODE_GetCurrentName());
73507350 }
73517351
73527352 case ACSF_SetGamemodeLimit:
diff -r ee12a70c0d7c -r 490f782919b3 src/scoreboard.cpp
--- a/src/scoreboard.cpp Wed Jun 02 00:23:58 2021 -0400
+++ b/src/scoreboard.cpp Wed Jun 02 00:48:10 2021 -0400
@@ -817,7 +817,7 @@
817817 else
818818 {
819819 // [AK] TLMS and team possession should still keep "team" in the title for consistency.
820- text = invasion ? INVASION_GetCurrentWaveString( ) : GAMEMODE_GetName( GAMEMODE_GetCurrentMode( ));
820+ text = invasion ? INVASION_GetCurrentWaveString( ) : GAMEMODE_GetCurrentName( );
821821
822822 // [AK] Append "co-op" to the end of "survival".
823823 if ( survival )
@@ -1637,7 +1637,7 @@
16371637 }
16381638
16391639 // [AK] Draw the name of the current game mode.
1640- HUD_DrawTextCentered( SmallFont, CR_GOLD, g_ulCurYPos, GAMEMODE_GetName( GAMEMODE_GetCurrentMode( )), g_bScale );
1640+ HUD_DrawTextCentered( SmallFont, CR_GOLD, g_ulCurYPos, GAMEMODE_GetCurrentName( ), g_bScale );
16411641 g_ulCurYPos += 10;
16421642
16431643 // Draw the time, frags, points, or kills we have left until the level ends.
Show on old repository browser