diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 381c50182..c0cd1cf1c 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -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) diff --git a/src/game/server/teams.cpp b/src/game/server/teams.cpp index f50eefdd6..ce3a5b491 100644 --- a/src/game/server/teams.cpp +++ b/src/game/server/teams.cpp @@ -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); }