mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 15:08:19 +00:00
Merge pull request #7648 from dobrykafe/pr-master-info
report the ddrace team to master instead of the normal team
This commit is contained in:
commit
ddd10f2308
|
@ -4711,6 +4711,7 @@ void CGameContext::OnUpdatePlayerServerInfo(char *aBuf, int BufSize, int ID)
|
|||
}
|
||||
}
|
||||
|
||||
const int Team = m_pController->IsTeamPlay() ? m_apPlayers[ID]->GetTeam() : m_apPlayers[ID]->GetTeam() == TEAM_SPECTATORS ? -1 : GetDDRaceTeam(ID);
|
||||
str_format(aBuf, BufSize,
|
||||
",\"skin\":{"
|
||||
"%s"
|
||||
|
@ -4719,5 +4720,5 @@ void CGameContext::OnUpdatePlayerServerInfo(char *aBuf, int BufSize, int ID)
|
|||
"\"team\":%d",
|
||||
aJsonSkin,
|
||||
JsonBool(m_apPlayers[ID]->IsAfk()),
|
||||
m_apPlayers[ID]->GetTeam());
|
||||
Team);
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@ public:
|
|||
CClientMask GetMaskForPlayerWorldEvent(int Asker, int ExceptID = -1);
|
||||
virtual void InitTeleporter();
|
||||
|
||||
bool IsTeamPlay() { return m_GameFlags & GAMEFLAG_TEAMS; }
|
||||
// DDRace
|
||||
|
||||
float m_CurrentRecord;
|
||||
|
|
|
@ -626,6 +626,11 @@ void CPlayer::SetTeam(int Team, bool DoChatMsg)
|
|||
pPlayer->m_SpectatorID = SPEC_FREEVIEW;
|
||||
}
|
||||
}
|
||||
|
||||
if(!GameServer()->m_pController->IsTeamPlay())
|
||||
{
|
||||
Server()->ExpireServerInfo();
|
||||
}
|
||||
}
|
||||
|
||||
bool CPlayer::SetTimerType(int TimerType)
|
||||
|
|
Loading…
Reference in a new issue