mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix /spec + super crash (fixes #2262)
Thanks to Learath2 for finding a better solution.
This commit is contained in:
parent
18f5ae442a
commit
e38cd6b6f2
|
@ -106,7 +106,7 @@ void CGameContext::ConSuper(IConsole::IResult *pResult, void *pUserData)
|
|||
if (pChr && !pChr->m_Super)
|
||||
{
|
||||
pChr->m_Super = true;
|
||||
pSelf->m_World.m_Core.m_apCharacters[pResult->m_ClientID]->m_Super = true;
|
||||
pChr->Core()->m_Super = true;
|
||||
pChr->UnFreeze();
|
||||
pChr->m_TeamBeforeSuper = pChr->Team();
|
||||
pChr->Teams()->SetCharacterTeam(pResult->m_ClientID, TEAM_SUPER);
|
||||
|
@ -123,7 +123,7 @@ void CGameContext::ConUnSuper(IConsole::IResult *pResult, void *pUserData)
|
|||
if (pChr && pChr->m_Super)
|
||||
{
|
||||
pChr->m_Super = false;
|
||||
pSelf->m_World.m_Core.m_apCharacters[pResult->m_ClientID]->m_Super = false;
|
||||
pChr->Core()->m_Super = false;
|
||||
pChr->Teams()->SetForceCharacterTeam(pResult->m_ClientID,
|
||||
pChr->m_TeamBeforeSuper);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue