mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #7885 from furo321/practice-improvements
Small improvements to practice
This commit is contained in:
commit
c3e3ac5732
|
@ -442,7 +442,6 @@ private:
|
||||||
static void ConUnlock(IConsole::IResult *pResult, void *pUserData);
|
static void ConUnlock(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConInvite(IConsole::IResult *pResult, void *pUserData);
|
static void ConInvite(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConJoin(IConsole::IResult *pResult, void *pUserData);
|
static void ConJoin(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConAccept(IConsole::IResult *pResult, void *pUserData);
|
|
||||||
static void ConMe(IConsole::IResult *pResult, void *pUserData);
|
static void ConMe(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConWhisper(IConsole::IResult *pResult, void *pUserData);
|
static void ConWhisper(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConConverse(IConsole::IResult *pResult, void *pUserData);
|
static void ConConverse(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
|
|
@ -372,7 +372,7 @@ const char *CGameTeams::SetCharacterTeam(int ClientID, int Team)
|
||||||
return "Invalid client ID";
|
return "Invalid client ID";
|
||||||
if(Team < 0 || Team >= MAX_CLIENTS + 1)
|
if(Team < 0 || Team >= MAX_CLIENTS + 1)
|
||||||
return "Invalid team number";
|
return "Invalid team number";
|
||||||
if(Team != TEAM_SUPER && m_aTeamState[Team] > TEAMSTATE_OPEN)
|
if(Team != TEAM_SUPER && m_aTeamState[Team] > TEAMSTATE_OPEN && !m_aPractice[Team])
|
||||||
return "This team started already";
|
return "This team started already";
|
||||||
if(m_Core.Team(ClientID) == Team)
|
if(m_Core.Team(ClientID) == Team)
|
||||||
return "You are in this team already";
|
return "You are in this team already";
|
||||||
|
@ -1102,7 +1102,7 @@ void CGameTeams::OnCharacterDeath(int ClientID, int Weapon)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(m_aTeamState[m_Core.Team(ClientID)] == CGameTeams::TEAMSTATE_STARTED && !m_aTeeStarted[ClientID])
|
if(m_aTeamState[m_Core.Team(ClientID)] == CGameTeams::TEAMSTATE_STARTED && !m_aTeeStarted[ClientID] && !m_aPractice[Team])
|
||||||
{
|
{
|
||||||
char aBuf[128];
|
char aBuf[128];
|
||||||
str_format(aBuf, sizeof(aBuf), "This team cannot finish anymore because '%s' left the team before hitting the start", Server()->ClientName(ClientID));
|
str_format(aBuf, sizeof(aBuf), "This team cannot finish anymore because '%s' left the team before hitting the start", Server()->ClientName(ClientID));
|
||||||
|
|
Loading…
Reference in a new issue