Compare commits

..

2 commits

Author SHA1 Message Date
Tater 29a5ef19f6
Merge 1ff664ed89 into 217103a0ee 2024-09-17 11:16:42 +03:30
Tater 1ff664ed89 Enabled cl_sub_tick_aiming by default 2024-09-16 21:45:14 -05:00
4 changed files with 15 additions and 19 deletions

View file

@ -228,7 +228,7 @@ MACRO_CONFIG_INT(SvWarmup, sv_warmup, 0, 0, 0, CFGFLAG_SERVER, "Number of second
MACRO_CONFIG_STR(SvMotd, sv_motd, 900, "", CFGFLAG_SERVER, "Message of the day to display for the clients")
MACRO_CONFIG_STR(SvGametype, sv_gametype, 32, "ddnet", CFGFLAG_SERVER, "Game type (ddnet, mod)")
MACRO_CONFIG_INT(SvTournamentMode, sv_tournament_mode, 0, 0, 1, CFGFLAG_SERVER, "Tournament mode. When enabled, players joins the server as spectator")
MACRO_CONFIG_INT(SvSpamprotection, sv_spamprotection, 1, 0, 1, CFGFLAG_SERVER, "Spam protection for: team change, chat, skin change, emotes and votes")
MACRO_CONFIG_INT(SvSpamprotection, sv_spamprotection, 1, 0, 1, CFGFLAG_SERVER, "Spam protection")
MACRO_CONFIG_INT(SvSpectatorSlots, sv_spectator_slots, 0, 0, MAX_CLIENTS, CFGFLAG_SERVER, "Number of slots to reserve for spectators")
MACRO_CONFIG_INT(SvInactiveKickTime, sv_inactivekick_time, 0, 0, 1000, CFGFLAG_SERVER, "How many minutes to wait before taking care of inactive players")

View file

@ -620,12 +620,10 @@ void *CGameClient::TranslateGameMsg(int *pMsgId, CUnpacker *pUnpacker, int Conn)
switch(GameMsgId)
{
case protocol7::GAMEMSG_CTF_DROP:
if(Conn == g_Config.m_ClDummy)
m_Sounds.Enqueue(CSounds::CHN_GLOBAL, SOUND_CTF_DROP);
m_Sounds.Enqueue(CSounds::CHN_GLOBAL, SOUND_CTF_DROP);
break;
case protocol7::GAMEMSG_CTF_RETURN:
if(Conn == g_Config.m_ClDummy)
m_Sounds.Enqueue(CSounds::CHN_GLOBAL, SOUND_CTF_RETURN);
m_Sounds.Enqueue(CSounds::CHN_GLOBAL, SOUND_CTF_RETURN);
break;
case protocol7::GAMEMSG_TEAM_ALL:
{
@ -652,8 +650,7 @@ void *CGameClient::TranslateGameMsg(int *pMsgId, CUnpacker *pUnpacker, int Conn)
}
break;
case protocol7::GAMEMSG_CTF_GRAB:
if(Conn == g_Config.m_ClDummy)
m_Sounds.Enqueue(CSounds::CHN_GLOBAL, SOUND_CTF_GRAB_EN);
m_Sounds.Enqueue(CSounds::CHN_GLOBAL, SOUND_CTF_GRAB_EN);
break;
case protocol7::GAMEMSG_GAME_PAUSED:
{
@ -663,8 +660,7 @@ void *CGameClient::TranslateGameMsg(int *pMsgId, CUnpacker *pUnpacker, int Conn)
}
break;
case protocol7::GAMEMSG_CTF_CAPTURE:
if(Conn == g_Config.m_ClDummy)
m_Sounds.Enqueue(CSounds::CHN_GLOBAL, SOUND_CTF_CAPTURE);
m_Sounds.Enqueue(CSounds::CHN_GLOBAL, SOUND_CTF_CAPTURE);
int ClientId = clamp(aParaI[1], 0, MAX_CLIENTS - 1);
m_aStats[ClientId].m_FlagCaptures++;

View file

@ -1028,7 +1028,7 @@ bool CScoreWorker::ShowTop(IDbConnection *pSqlServer, const ISqlData *pGameData,
if(!g_Config.m_SvRegionalRankings)
{
str_copy(pResult->m_Data.m_aaMessages[Line], "-----------------------------------------", sizeof(pResult->m_Data.m_aaMessages[Line]));
str_copy(pResult->m_Data.m_aaMessages[Line], "----------------------------------------", sizeof(pResult->m_Data.m_aaMessages[Line]));
return !End;
}
@ -1146,7 +1146,7 @@ bool CScoreWorker::ShowTeamTop5(IDbConnection *pSqlServer, const ISqlData *pGame
}
}
str_copy(paMessages[Line], "---------------------------------", sizeof(paMessages[Line]));
str_copy(paMessages[Line], "-------------------------------", sizeof(paMessages[Line]));
return false;
}
@ -1230,7 +1230,7 @@ bool CScoreWorker::ShowPlayerTeamTop5(IDbConnection *pSqlServer, const ISqlData
break;
}
}
str_copy(paMessages[Line], "---------------------------------", sizeof(paMessages[Line]));
str_copy(paMessages[Line], "-------------------------------", sizeof(paMessages[Line]));
}
else
{
@ -1352,7 +1352,7 @@ bool CScoreWorker::ShowTimes(IDbConnection *pSqlServer, const ISqlData *pGameDat
{
return true;
}
str_copy(paMessages[Line], "-------------------------------------------", sizeof(paMessages[Line]));
str_copy(paMessages[Line], "----------------------------------------------------", sizeof(paMessages[Line]));
return false;
}

View file

@ -160,7 +160,7 @@ TEST_P(SingleScore, Top)
ExpectLines(m_pPlayerResult,
{"------------ Global Top ------------",
"1. nameless tee Time: 01:40.00",
"-----------------------------------------"});
"----------------------------------------"});
}
TEST_P(SingleScore, RankRegional)
@ -197,7 +197,7 @@ TEST_P(SingleScore, TopServer)
ExpectLines(m_pPlayerResult,
{"------------ Global Top ------------",
"1. nameless tee Time: 01:40.00",
"-----------------------------------------"});
"----------------------------------------"});
}
TEST_P(SingleScore, RankServerRegional)
@ -264,7 +264,7 @@ TEST_P(SingleScore, TimesExists)
str_copy(aBuf, m_pPlayerResult->m_Data.m_aaMessages[1] + str_length(m_pPlayerResult->m_Data.m_aaMessages[1]) - 10, 11);
EXPECT_STREQ(aBuf, ", 01:40.00");
EXPECT_STREQ(m_pPlayerResult->m_Data.m_aaMessages[2], "-------------------------------------------");
EXPECT_STREQ(m_pPlayerResult->m_Data.m_aaMessages[2], "----------------------------------------------------");
for(int i = 3; i < CScorePlayerResult::MAX_MESSAGES; i++)
{
EXPECT_STREQ(m_pPlayerResult->m_Data.m_aaMessages[i], "");
@ -321,7 +321,7 @@ TEST_P(TeamScore, All)
ExpectLines(m_pPlayerResult,
{"------- Team Top 5 -------",
"1. brainless tee & nameless tee Team Time: 01:40.00",
"---------------------------------"});
"-------------------------------"});
}
TEST_P(TeamScore, PlayerExists)
@ -331,7 +331,7 @@ TEST_P(TeamScore, PlayerExists)
ExpectLines(m_pPlayerResult,
{"------- Team Top 5 -------",
"1. brainless tee & nameless tee Team Time: 01:40.00",
"---------------------------------"});
"-------------------------------"});
}
TEST_P(TeamScore, PlayerDoesntExist)
@ -349,7 +349,7 @@ TEST_P(TeamScore, RankUpdates)
ExpectLines(m_pPlayerResult,
{"------- Team Top 5 -------",
"1. brainless tee & nameless tee Team Time: 01:38.00",
"---------------------------------"});
"-------------------------------"});
}
struct MapInfo : public Score