Merge pull request #7885 from furo321/practice-improvements

Small improvements to practice
This commit is contained in:
Dennis Felsing 2024-01-31 09:00:18 +00:00 committed by GitHub
commit c3e3ac5732
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -442,7 +442,6 @@ private:
static void ConUnlock(IConsole::IResult *pResult, void *pUserData);
static void ConInvite(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 ConWhisper(IConsole::IResult *pResult, void *pUserData);
static void ConConverse(IConsole::IResult *pResult, void *pUserData);

View file

@ -372,7 +372,7 @@ const char *CGameTeams::SetCharacterTeam(int ClientID, int Team)
return "Invalid client ID";
if(Team < 0 || Team >= MAX_CLIENTS + 1)
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";
if(m_Core.Team(ClientID) == Team)
return "You are in this team already";
@ -1102,7 +1102,7 @@ void CGameTeams::OnCharacterDeath(int ClientID, int Weapon)
}
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];
str_format(aBuf, sizeof(aBuf), "This team cannot finish anymore because '%s' left the team before hitting the start", Server()->ClientName(ClientID));