mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix server crash with too many items (fixes #3477)
This commit is contained in:
parent
71a371a4ee
commit
5c4fc9471a
|
@ -404,6 +404,8 @@ void CPlayer::Snap(int SnappingClient)
|
|||
GameServer()->m_apPlayers[SnappingClient]->m_TimerType == TIMERTYPE_SIXUP)
|
||||
{
|
||||
protocol7::CNetObj_PlayerInfoRace *pRaceInfo = static_cast<protocol7::CNetObj_PlayerInfoRace *>(Server()->SnapNewItem(-protocol7::NETOBJTYPE_PLAYERINFORACE, id, sizeof(protocol7::CNetObj_PlayerInfoRace)));
|
||||
if(!pRaceInfo)
|
||||
return;
|
||||
pRaceInfo->m_RaceStartTick = m_pCharacter->m_StartTime;
|
||||
}
|
||||
|
||||
|
@ -418,6 +420,9 @@ void CPlayer::Snap(int SnappingClient)
|
|||
if(ShowSpec)
|
||||
{
|
||||
CNetObj_SpecChar *pSpecChar = static_cast<CNetObj_SpecChar *>(Server()->SnapNewItem(NETOBJTYPE_SPECCHAR, id, sizeof(CNetObj_SpecChar)));
|
||||
if(!pSpecChar)
|
||||
return;
|
||||
|
||||
pSpecChar->m_X = m_pCharacter->Core()->m_Pos.x;
|
||||
pSpecChar->m_Y = m_pCharacter->Core()->m_Pos.y;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue