Merge pull request #8964 from furo321/fix-dragger-crash

Fix crash while attached to dragger during `hot_reload`
This commit is contained in:
Dennis Felsing 2024-09-16 13:06:01 +00:00 committed by GitHub
commit 67eb609452
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();