mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 05:58:19 +00:00
Merge pull request #8905 from furo321/hot-reload-super-crash
Fix crash with `hot_reload` while in `super`
This commit is contained in:
commit
3b22a3e02f
|
@ -3216,15 +3216,19 @@ void CGameContext::ConHotReload(IConsole::IResult *pResult, void *pUserData)
|
|||
if(!pSelf->GetPlayerChar(i))
|
||||
continue;
|
||||
|
||||
CCharacter *pChar = pSelf->GetPlayerChar(i);
|
||||
|
||||
// Save the tee individually
|
||||
pSelf->m_apSavedTees[i] = new CSaveTee();
|
||||
pSelf->m_apSavedTees[i]->Save(pSelf->GetPlayerChar(i), false);
|
||||
pSelf->m_apSavedTees[i]->Save(pChar, false);
|
||||
|
||||
if(pSelf->m_apPlayers[i])
|
||||
pSelf->m_apSavedTeleTees[i] = new CSaveTee(pSelf->m_apPlayers[i]->m_LastTeleTee);
|
||||
|
||||
// Save the team state
|
||||
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]])
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue