Merge pull request #2033 from def-/pr-fix-crash

Fix crash on pDDNetCharacter
This commit is contained in:
Dennis Felsing 2020-01-16 12:41:42 +01:00 committed by GitHub
commit dcd8148d9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1152,6 +1152,9 @@ void CCharacter::Snap(int SnappingClient)
pCharacter->m_PlayerFlags = GetPlayer()->m_PlayerFlags;
CNetObj_DDNetCharacter *pDDNetCharacter = static_cast<CNetObj_DDNetCharacter *>(Server()->SnapNewItem(NETOBJTYPE_DDNETCHARACTER, id, sizeof(CNetObj_DDNetCharacter)));
if(!pDDNetCharacter)
return;
pDDNetCharacter->m_Flags = 0;
if(m_Solo)
pDDNetCharacter->m_Flags |= CHARACTERFLAG_SOLO;