Merge pull request #7314 from furo321/keep-practice

Don't disable practice on death.
This commit is contained in:
Dennis Felsing 2023-10-07 21:28:28 +00:00 committed by GitHub
commit 7034ca84ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1047,8 +1047,22 @@ void CGameTeams::OnCharacterDeath(int ClientID, int Weapon)
if(g_Config.m_SvTeam == SV_TEAM_FORCED_SOLO && Team != TEAM_SUPER) if(g_Config.m_SvTeam == SV_TEAM_FORCED_SOLO && Team != TEAM_SUPER)
{ {
ChangeTeamState(Team, CGameTeams::TEAMSTATE_OPEN); ChangeTeamState(Team, CGameTeams::TEAMSTATE_OPEN);
if(m_aPractice[Team])
{
if(Weapon == WEAPON_SELF)
{
ResetRoundState(Team); ResetRoundState(Team);
} }
else
{
GameServer()->SendChatTeam(Team, "You died, but will stay in practice until you use kill.");
}
}
else
{
ResetRoundState(Team);
}
}
else if(Locked) else if(Locked)
{ {
SetForceCharacterTeam(ClientID, Team); SetForceCharacterTeam(ClientID, Team);