Hide scoreboard if statboard is present

This commit is contained in:
Nikita Zyuzin 2015-05-21 13:55:51 +04:00
parent d8d20b0c1a
commit 12652985c3
4 changed files with 11 additions and 7 deletions

View file

@ -2894,7 +2894,7 @@ void CClient::AutoScreenshot_Start()
void CClient::AutoStatScreenshot_Start()
{
if(g_Config.m_ClStatboardScreenshot)
if(g_Config.m_ClAutoStatboardScreenshot)
{
Graphics()->TakeScreenshot("auto/stats/autoscreen");
m_AutoStatScreenshotRecycle = true;
@ -2919,11 +2919,11 @@ void CClient::AutoStatScreenshot_Cleanup()
{
if(m_AutoStatScreenshotRecycle)
{
if(g_Config.m_ClStatboardScreenshotMax)
if(g_Config.m_ClAutoStatboardScreenshotMax)
{
// clean up auto taken screens
CFileCollection AutoScreens;
AutoScreens.Init(Storage(), "screenshots/auto/stats", "autoscreen", ".png", g_Config.m_ClStatboardScreenshotMax);
AutoScreens.Init(Storage(), "screenshots/auto/stats", "autoscreen", ".png", g_Config.m_ClAutoStatboardScreenshotMax);
}
m_AutoStatScreenshotRecycle = false;
}

View file

@ -14,6 +14,7 @@
#include <game/client/render.h>
#include <game/client/components/countryflags.h>
#include <game/client/components/motd.h>
#include <game/client/components/statboard.h>
#include "scoreboard.h"
@ -616,7 +617,10 @@ void CScoreboard::OnRender()
bool CScoreboard::Active()
{
// if we activly wanna look on the scoreboard
// if statboard is active dont show scoreboard
if(m_pClient->m_pStatboard->IsActive())
return false;
if(m_Active)
return true;

View file

@ -121,7 +121,7 @@ void CStatboard::OnMessage(int MsgType, void *pRawMsg)
void CStatboard::OnRender()
{
if(g_Config.m_ClStatboardScreenshot)
if(g_Config.m_ClAutoStatboardScreenshot)
{
if(m_ScreenshotTime < 0 && m_pClient->m_Snap.m_pGameInfoObj && m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_GAMEOVER)
m_ScreenshotTime = time_get() + time_freq() * 3;

View file

@ -69,8 +69,8 @@ MACRO_CONFIG_STR(ClDDNetMapServer, cl_ddnet_maps_server, 100, "maps.ddnet.tw", C
MACRO_CONFIG_STR(ClLanguagefile, cl_languagefile, 255, "", CFGFLAG_CLIENT|CFGFLAG_SAVE, "What language file to use")
MACRO_CONFIG_INT(ClShowNewSkins, cl_show_new_skins, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show new skins ingame")
MACRO_CONFIG_INT(ClShowCustomSkins, cl_show_custom_skins, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show custom skins ingame")
MACRO_CONFIG_INT(ClStatboardScreenshot, cl_statboard_screenshot, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Automatically take game over statboard screenshot")
MACRO_CONFIG_INT(ClStatboardScreenshotMax, cl_statboard_screenshot_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically created statboard screenshots (0 = no limit)")
MACRO_CONFIG_INT(ClAutoStatboardScreenshot, cl_auto_statboard_screenshot, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Automatically take game over statboard screenshot")
MACRO_CONFIG_INT(ClAutoStatboardScreenshotMax, cl_auto_statboard_screenshot_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically created statboard screenshots (0 = no limit)")
MACRO_CONFIG_INT(ClDefaultZoom, cl_default_zoom, 10, 0, 20, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Default zoom level (10 default, min 0, max 20)")