Kill player when /practice is on and they get kicked out of team

This commit is contained in:
def 2020-05-28 21:50:35 +02:00
parent 80adf66620
commit 4cc1bc0cf8

View file

@ -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);