This commit is contained in:
def 2016-11-03 22:10:31 +01:00
parent 795e68ec2b
commit 34531c0696

View file

@ -1768,8 +1768,7 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket)
m_CurrentRecvTick[g_Config.m_ClDummy] = GameTick;
}
// TODO: clean this up abit
mem_copy((char*)m_aSnapshotIncomingData + Part*MAX_SNAPSHOT_PACKSIZE, pData, PartSize);
mem_copy((char*)m_aSnapshotIncomingData + Part*MAX_SNAPSHOT_PACKSIZE, pData, clamp(PartSize, 0, (int)sizeof(m_aSnapshotIncomingData) - Part*MAX_SNAPSHOT_PACKSIZE));
m_SnapshotParts |= 1<<Part;
if(m_SnapshotParts == (unsigned)((1<<NumParts)-1))
@ -2024,8 +2023,7 @@ void CClient::ProcessServerPacketDummy(CNetChunk *pPacket)
m_CurrentRecvTick[!g_Config.m_ClDummy] = GameTick;
}
// TODO: clean this up abit
mem_copy((char*)m_aSnapshotIncomingData + Part*MAX_SNAPSHOT_PACKSIZE, pData, PartSize);
mem_copy((char*)m_aSnapshotIncomingData + Part*MAX_SNAPSHOT_PACKSIZE, pData, clamp(PartSize, 0, (int)sizeof(m_aSnapshotIncomingData) - Part*MAX_SNAPSHOT_PACKSIZE));
m_SnapshotParts |= 1<<Part;
if(m_SnapshotParts == (unsigned)((1<<NumParts)-1))