| 3447 | } |
| 3448 | |
| 3449 | void CGameContext::ConHotReload(IConsole::IResult *pResult, void *pUserData) |
| 3450 | { |
| 3451 | CGameContext *pSelf = (CGameContext *)pUserData; |
| 3452 | for(int i = 0; i < MAX_CLIENTS; i++) |
| 3453 | { |
| 3454 | if(!pSelf->GetPlayerChar(i)) |
| 3455 | continue; |
| 3456 | |
| 3457 | CCharacter *pChar = pSelf->GetPlayerChar(i); |
| 3458 | |
| 3459 | // Save the tee individually |
| 3460 | pSelf->m_apSavedTees[i] = new CSaveHotReloadTee(); |
| 3461 | pSelf->m_apSavedTees[i]->Save(pChar, false); |
| 3462 | |
| 3463 | // Save the team state |
| 3464 | pSelf->m_aTeamMapping[i] = pSelf->GetDDRaceTeam(i); |
| 3465 | if(pSelf->m_aTeamMapping[i] == TEAM_SUPER) |
| 3466 | pSelf->m_aTeamMapping[i] = pChar->m_TeamBeforeSuper; |
| 3467 | |
| 3468 | if(pSelf->m_apSavedTeams[pSelf->m_aTeamMapping[i]]) |
| 3469 | continue; |
| 3470 | |
| 3471 | pSelf->m_apSavedTeams[pSelf->m_aTeamMapping[i]] = new CSaveTeam(); |
| 3472 | pSelf->m_apSavedTeams[pSelf->m_aTeamMapping[i]]->Save(pSelf, pSelf->m_aTeamMapping[i], true, true); |
| 3473 | } |
| 3474 | pSelf->Server()->ReloadMap(); |
| 3475 | } |
| 3476 | |
| 3477 | void CGameContext::ConAddVote(IConsole::IResult *pResult, void *pUserData) |
| 3478 | { |
nothing calls this directly
no test coverage detected