From 4cc1bc0cf826f0c846a377643d4461618aa5b0b2 Mon Sep 17 00:00:00 2001 From: def Date: Thu, 28 May 2020 21:50:35 +0200 Subject: [PATCH] Kill player when /practice is on and they get kicked out of team --- src/game/server/ddracecommands.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/server/ddracecommands.cpp b/src/game/server/ddracecommands.cpp index 63ba86c46..803a85104 100644 --- a/src/game/server/ddracecommands.cpp +++ b/src/game/server/ddracecommands.cpp @@ -660,7 +660,9 @@ void CGameContext::ConSetDDRTeam(IConsole::IResult *pResult, void *pUserData) if (Team < TEAM_FLOCK || Team >= TEAM_SUPER) return; - if(pController->m_Teams.m_Core.Team(Target) && pController->m_Teams.GetDDRaceState(pSelf->m_apPlayers[Target]) == DDRACE_STARTED) + CCharacter* pChr = pSelf->GetPlayerChar(Target); + + if((pController->m_Teams.m_Core.Team(Target) && pController->m_Teams.GetDDRaceState(pSelf->m_apPlayers[Target]) == DDRACE_STARTED) || (pChr && pController->m_Teams.IsPractice(pChr->Team()))) pSelf->m_apPlayers[Target]->KillCharacter(WEAPON_SELF); pController->m_Teams.SetForceCharacterTeam(Target, Team);