mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #1883
1883: Fix crashbug on set_team_ddr -1 r=Learath2 a=fokkonaut Teams over 63 are also forbidden, so I check for that too. Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
This commit is contained in:
commit
b0f1164485
|
@ -661,6 +661,9 @@ void CGameContext::ConSetDDRTeam(IConsole::IResult *pResult, void *pUserData)
|
|||
int Target = pResult->GetVictim();
|
||||
int Team = pResult->GetInteger(1);
|
||||
|
||||
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)
|
||||
pSelf->m_apPlayers[Target]->KillCharacter(WEAPON_SELF);
|
||||
|
||||
|
|
Loading…
Reference in a new issue