From 222261241231b64ffba7be3116032dc72b6507f8 Mon Sep 17 00:00:00 2001 From: VoxelDoesCode Date: Wed, 17 May 2023 15:59:42 -0400 Subject: [PATCH] Only run `KillTeam()` when team has more than 1 tee Clang format #6606 --- src/game/server/teams.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/game/server/teams.cpp b/src/game/server/teams.cpp index 09e656698..598daa2ad 100644 --- a/src/game/server/teams.cpp +++ b/src/game/server/teams.cpp @@ -1061,14 +1061,15 @@ void CGameTeams::OnCharacterDeath(int ClientID, int Weapon) { ChangeTeamState(Team, CGameTeams::TEAMSTATE_OPEN); - 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_aPractice[Team] = false; - KillTeam(Team, Weapon == WEAPON_SELF ? ClientID : -1, ClientID); if(Count(Team) > 1) { + KillTeam(Team, Weapon == WEAPON_SELF ? ClientID : -1, ClientID); + + 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"); + GameServer()->SendChatTeam(Team, aBuf); } }