mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #8216 from Robyt3/Demo-ServerInfo-Fix
Fix incorrect score kind in demos depending on last server
This commit is contained in:
commit
aca25cc802
|
@ -658,9 +658,6 @@ int CClient::GetCurrentRaceTime()
|
|||
void CClient::GetServerInfo(CServerInfo *pServerInfo) const
|
||||
{
|
||||
mem_copy(pServerInfo, &m_CurrentServerInfo, sizeof(m_CurrentServerInfo));
|
||||
|
||||
if(m_DemoPlayer.IsPlaying() && g_Config.m_ClDemoAssumeRace)
|
||||
str_copy(pServerInfo->m_aGameType, "DDraceNetwork");
|
||||
}
|
||||
|
||||
void CClient::ServerInfoRequest()
|
||||
|
@ -3564,10 +3561,15 @@ const char *CClient::DemoPlayer_Play(const char *pFilename, int StorageType)
|
|||
}
|
||||
}
|
||||
|
||||
// setup current info
|
||||
// setup current server info
|
||||
mem_zero(&m_CurrentServerInfo, sizeof(m_CurrentServerInfo));
|
||||
str_copy(m_CurrentServerInfo.m_aMap, pMapInfo->m_aName);
|
||||
m_CurrentServerInfo.m_MapCrc = pMapInfo->m_Crc;
|
||||
m_CurrentServerInfo.m_MapSize = pMapInfo->m_Size;
|
||||
if(g_Config.m_ClDemoAssumeRace)
|
||||
{
|
||||
str_copy(m_CurrentServerInfo.m_aGameType, "DDraceNetwork");
|
||||
}
|
||||
|
||||
GameClient()->OnConnected();
|
||||
|
||||
|
|
Loading…
Reference in a new issue