mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Merge pull request #8964 from furo321/fix-dragger-crash
Fix crash while attached to dragger during `hot_reload`
This commit is contained in:
commit
67eb609452
|
@ -529,12 +529,12 @@ ESaveResult CSaveTeam::Save(CGameContext *pGameServer, int Team, bool Dry, bool
|
|||
CCharacter *p = (CCharacter *)pGameServer->m_World.FindFirst(CGameWorld::ENTTYPE_CHARACTER);
|
||||
for(; p; p = (CCharacter *)p->TypeNext())
|
||||
{
|
||||
if(pTeams->m_Core.Team(p->GetPlayer()->GetCid()) != Team)
|
||||
if(pTeams->m_Core.Team(p->GetPlayer()->GetCid()) != Team && !Force)
|
||||
continue;
|
||||
if(m_MembersCount == j)
|
||||
if(m_MembersCount == j && !Force)
|
||||
return ESaveResult::CHAR_NOT_FOUND;
|
||||
ESaveResult Result = pGameServer->m_World.BlocksSave(p->GetPlayer()->GetCid());
|
||||
if(Result != ESaveResult::SUCCESS)
|
||||
if(Result != ESaveResult::SUCCESS && !Force)
|
||||
return Result;
|
||||
m_pSavedTees[j].Save(p);
|
||||
aPlayerCids[j] = p->GetPlayer()->GetCid();
|
||||
|
|
Loading…
Reference in a new issue