MCPcopy Create free account
hub / github.com/ddnet/ddnet / MatchCharacter

Method MatchCharacter

src/game/server/save.cpp:663–672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661}
662
663CCharacter *CSaveTeam::MatchCharacter(CGameContext *pGameServer, int ClientId, int SaveId, bool KeepCurrentCharacter) const
664{
665 if(KeepCurrentCharacter && pGameServer->m_apPlayers[ClientId]->GetCharacter())
666 {
667 // keep old character to retain current weak/strong order
668 return pGameServer->m_apPlayers[ClientId]->GetCharacter();
669 }
670 pGameServer->m_apPlayers[ClientId]->KillCharacter(WEAPON_GAME);
671 return pGameServer->m_apPlayers[ClientId]->ForceSpawn(m_pSavedTees[SaveId].GetPos());
672}
673
674char *CSaveTeam::GetString()
675{

Callers

nothing calls this directly

Calls 4

GetCharacterMethod · 0.80
KillCharacterMethod · 0.80
ForceSpawnMethod · 0.80
GetPosMethod · 0.45

Tested by

no test coverage detected