Turn off practice mode and reset practice wishes when locked team dies

This commit is contained in:
def 2020-05-27 23:36:58 +02:00
parent fb90990d6d
commit c00759a0ed

View file

@ -693,9 +693,13 @@ void CGameTeams::OnCharacterDeath(int ClientID, int Weapon)
char aBuf[512];
str_format(aBuf, sizeof(aBuf), "Everyone in your locked team was killed because '%s' %s.", Server()->ClientName(ClientID), Weapon == WEAPON_SELF ? "killed" : "died");
m_Practice[Team] = false;
for(int i = 0; i < MAX_CLIENTS; i++)
if(m_Core.Team(i) == Team && GameServer()->m_apPlayers[i])
{
GameServer()->m_apPlayers[i]->m_VotedForPractice = false;
if(i != ClientID)
{
GameServer()->m_apPlayers[i]->KillCharacter(WEAPON_SELF);