mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Can't Leave Spectator's Team if you have done /pause. CLoses #86.
This commit is contained in:
parent
20bd0567d2
commit
954785f75e
|
@ -906,10 +906,15 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId)
|
|||
//if(m_pController->CanChangeTeam(pPlayer, pMsg->m_Team))
|
||||
//{
|
||||
//CCharacter* pChr=GetPlayerChar(ClientId);
|
||||
if(pPlayer->GetTeam()==-1 && !pPlayer->m_InfoSaved)
|
||||
{
|
||||
pPlayer->m_Last_SetTeam = Server()->Tick();
|
||||
if(pPlayer->GetTeam() == -1 || pMsg->m_Team == -1)
|
||||
m_VoteUpdate = true;
|
||||
pPlayer->SetTeam(pMsg->m_Team);
|
||||
}
|
||||
else
|
||||
SendChatTarget(ClientId,"Use /pause first then you can kill");
|
||||
//if(pChr && pMsg->m_Team!=-1 && pChr->m_Paused)
|
||||
//pChr->LoadPauseData();
|
||||
//TODO:Check if this system Works
|
||||
|
|
Loading…
Reference in a new issue