Preserve demo type when slicing

Previously all sliced demos used type "client", even if the original demo had type "server". Now the type of the original demo is copied when slicing.
This commit is contained in:
Robert Müller 2023-10-13 21:52:22 +02:00
parent 151394630f
commit 3af7de307a

View file

@ -1228,7 +1228,7 @@ void CDemoEditor::Slice(const char *pDemo, const char *pDst, int StartTick, int
CDemoRecorder DemoRecorder(m_pSnapshotDelta);
unsigned char *pMapData = DemoPlayer.GetMapData(m_pStorage);
const int Result = DemoRecorder.Start(m_pStorage, m_pConsole, pDst, m_pNetVersion, pMapInfo->m_aName, &Sha256, pMapInfo->m_Crc, "client", pMapInfo->m_Size, pMapData, NULL, pfnFilter, pUser) == -1;
const int Result = DemoRecorder.Start(m_pStorage, m_pConsole, pDst, m_pNetVersion, pMapInfo->m_aName, &Sha256, pMapInfo->m_Crc, pInfo->m_Header.m_aType, pMapInfo->m_Size, pMapData, NULL, pfnFilter, pUser) == -1;
free(pMapData);
if(Result != 0)
{