mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix loading client score. Thanks GreYFoX
This commit is contained in:
parent
7ecae53f6c
commit
e039cf6f35
|
@ -529,16 +529,26 @@ void CGameContext::OnClientEnter(int ClientId)
|
|||
{
|
||||
//world.insert_entity(&players[client_id]);
|
||||
m_apPlayers[ClientId]->Respawn();
|
||||
|
||||
m_apPlayers[ClientId]->m_Score = -9999;
|
||||
|
||||
// init the player
|
||||
Score()->PlayerData(ClientId)->Reset();
|
||||
Score()->LoadScore(ClientId);
|
||||
|
||||
char aBuf[512];
|
||||
str_format(aBuf, sizeof(aBuf), "'%s' entered and joined the %s", Server()->ClientName(ClientId), m_pController->GetTeamName(m_apPlayers[ClientId]->GetTeam()));
|
||||
SendChat(-1, CGameContext::CHAT_ALL, aBuf);
|
||||
|
||||
SendChatTarget(ClientId, "DDRace Mod. Version: " DDRACE_VERSION);
|
||||
SendChatTarget(ClientId, "Official site: DDRace.info");
|
||||
SendChatTarget(ClientId, "For more Info /CMDList");
|
||||
SendChatTarget(ClientId, "Or visit DDRace.info");
|
||||
SendChatTarget(ClientId, "To see this again say /info");
|
||||
|
||||
if (g_Config.m_SvWelcome[0]!=0) SendChatTarget(ClientId,g_Config.m_SvWelcome);
|
||||
str_format(aBuf, sizeof(aBuf), "team_join player='%d:%s' team=%d", ClientId, Server()->ClientName(ClientId), m_apPlayers[ClientId]->GetTeam());
|
||||
|
||||
Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "game", aBuf);
|
||||
|
||||
m_VoteUpdate = true;
|
||||
|
|
Loading…
Reference in a new issue