mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
ShowOthers for regular DDRace client
This commit is contained in:
parent
b21dc83b1a
commit
8d877973ee
|
@ -1042,7 +1042,7 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
|
|||
if(Unpacker.Error() == 0 && !str_comp(pCmd, "crashmeplx"))
|
||||
{
|
||||
CGameContext *GameServer = (CGameContext *) m_pGameServer;
|
||||
if (GameServer->m_apPlayers[ClientID] && GameServer->m_apPlayers[ClientID]->m_ClientVersion < DDNET_OLD)
|
||||
if (GameServer->m_apPlayers[ClientID] && GameServer->m_apPlayers[ClientID]->m_ClientVersion < VERSION_DDNET_OLD)
|
||||
GameServer->m_apPlayers[ClientID]->m_ClientVersion = VERSION_DDNET_OLD;
|
||||
} else
|
||||
if(Unpacker.Error() == 0 && m_aClients[ClientID].m_Authed)
|
||||
|
|
|
@ -314,13 +314,27 @@ void CGameTeams::SendTeamsState(int ClientID)
|
|||
if (g_Config.m_SvTeam == 3)
|
||||
return;
|
||||
|
||||
if (m_pGameContext->m_apPlayers[ClientID] && m_pGameContext->m_apPlayers[ClientID]->m_ClientVersion <= VERSION_DDRACE)
|
||||
if (!m_pGameContext->m_apPlayers[ClientID] || m_pGameContext->m_apPlayers[ClientID]->m_ClientVersion < VERSION_DDRACE)
|
||||
return;
|
||||
|
||||
CMsgPacker Msg(NETMSGTYPE_SV_TEAMSSTATE);
|
||||
|
||||
for(unsigned i = 0; i < MAX_CLIENTS; i++)
|
||||
Msg.AddInt(m_Core.Team(i));
|
||||
if (m_pGameContext->m_apPlayers[ClientID]->m_ClientVersion == VERSION_DDRACE)
|
||||
{
|
||||
for(unsigned i = 0; i < VANILLA_MAX_CLIENTS; i++)
|
||||
{
|
||||
int target = 0;
|
||||
Server()->ReverseTranslate(target, i);
|
||||
Msg.AddInt(m_Core.Team(target));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(unsigned i = 0; i < MAX_CLIENTS; i++)
|
||||
{
|
||||
Msg.AddInt(m_Core.Team(i));
|
||||
}
|
||||
}
|
||||
|
||||
Server()->SendMsg(&Msg, MSGFLAG_VITAL, ClientID);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue