- Added scoreboard toggling.

This commit is contained in:
ChillyDoom 2014-10-02 21:03:15 +01:00
parent c66c497811
commit c6e1ea864f
4 changed files with 13 additions and 1 deletions

View File

@ -273,7 +273,8 @@ void CT_Drawer (void)
if (players[consoleplayer].camera != NULL &&
(Button_ShowScores.bDown ||
players[consoleplayer].camera->health <= 0) &&
players[consoleplayer].camera->health <= 0 ||
SB_ForceActive) &&
// Don't draw during intermission, since it has its own scoreboard in wi_stuff.cpp.
gamestate != GS_INTERMISSION)
{

View File

@ -49,6 +49,7 @@
#include "hu_stuff.h"
#include "gstrings.h"
#include "d_net.h"
#include "c_dispatch.h"
// MACROS ------------------------------------------------------------------
@ -117,6 +118,8 @@ int STACK_ARGS compareteams (const void *arg1, const void *arg2)
return diff;
}
bool SB_ForceActive = false;
// PRIVATE DATA DEFINITIONS ------------------------------------------------
// CODE --------------------------------------------------------------------
@ -492,3 +495,8 @@ int HU_GetRowColor(player_t *player, bool highlight)
}
}
}
CCMD (togglescoreboard)
{
SB_ForceActive = !SB_ForceActive;
}

View File

@ -52,6 +52,8 @@ void HU_GetPlayerWidths(int &maxnamewidth, int &maxscorewidth, int &maxiconheigh
void HU_DrawColorBar(int x, int y, int height, int playernum);
int HU_GetRowColor(player_t *player, bool hightlight);
extern bool SB_ForceActive;
// Sorting routines
int STACK_ARGS comparepoints(const void *arg1, const void *arg2);

View File

@ -458,6 +458,7 @@ OptionMenu "CustomizeControls"
Control "Run", "+speed"
Control "Strafe", "+strafe"
Control "Show Scoreboard", "+showscores"
Control "Toggle Scoreboard", "togglescoreboard"
StaticText ""
StaticText "Chat", 1
Control "Say", "messagemode"