mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix crashbug on set_team_ddr -1
This commit is contained in:
parent
d35550ce19
commit
ac588f324c
|
@ -661,6 +661,9 @@ void CGameContext::ConSetDDRTeam(IConsole::IResult *pResult, void *pUserData)
|
|||
int Target = pResult->GetVictim();
|
||||
int Team = pResult->GetInteger(1);
|
||||
|
||||
if (Team < 0 || Team >= MAX_CLIENTS)
|
||||
return;
|
||||
|
||||
if(pController->m_Teams.m_Core.Team(Target) && pController->m_Teams.GetDDRaceState(pSelf->m_apPlayers[Target]) == DDRACE_STARTED)
|
||||
pSelf->m_apPlayers[Target]->KillCharacter(WEAPON_SELF);
|
||||
|
||||
|
|
Loading…
Reference in a new issue