mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Fix crash with hot_reload
while in super
This commit is contained in:
parent
e0a95d14a6
commit
9103332e36
|
@ -3208,12 +3208,16 @@ void CGameContext::ConHotReload(IConsole::IResult *pResult, void *pUserData)
|
||||||
if(!pSelf->GetPlayerChar(i))
|
if(!pSelf->GetPlayerChar(i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
CCharacter *pChar = pSelf->GetPlayerChar(i);
|
||||||
|
|
||||||
// Save the tee individually
|
// Save the tee individually
|
||||||
pSelf->m_apSavedTees[i] = new CSaveTee();
|
pSelf->m_apSavedTees[i] = new CSaveTee();
|
||||||
pSelf->m_apSavedTees[i]->Save(pSelf->GetPlayerChar(i), false);
|
pSelf->m_apSavedTees[i]->Save(pChar, false);
|
||||||
|
|
||||||
// Save the team state
|
// Save the team state
|
||||||
pSelf->m_aTeamMapping[i] = pSelf->GetDDRaceTeam(i);
|
pSelf->m_aTeamMapping[i] = pSelf->GetDDRaceTeam(i);
|
||||||
|
if(pSelf->m_aTeamMapping[i] == TEAM_SUPER)
|
||||||
|
pSelf->m_aTeamMapping[i] = pChar->m_TeamBeforeSuper;
|
||||||
|
|
||||||
if(pSelf->m_apSavedTeams[pSelf->m_aTeamMapping[i]])
|
if(pSelf->m_apSavedTeams[pSelf->m_aTeamMapping[i]])
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue