Fix demo recording with broken maps

This commit is contained in:
Learath 2020-02-19 15:37:31 +03:00
parent 7691227f24
commit c52bbb6c02
2 changed files with 3 additions and 2 deletions

View file

@ -46,7 +46,6 @@ int CDemoRecorder::Start(class IStorage *pStorage, class IConsole *pConsole, con
m_pfnFilter = pfnFilter;
m_pUser = pUser;
m_MapSize = MapSize;
m_pMapData = pMapData;
m_pConsole = pConsole;
@ -122,6 +121,9 @@ int CDemoRecorder::Start(class IStorage *pStorage, class IConsole *pConsole, con
CloseMapFile = true;
}
if(MapFile)
MapSize = io_length(MapFile);
// write header
mem_zero(&Header, sizeof(Header));
mem_copy(Header.m_aMarker, gs_aHeaderMarker, sizeof(Header.m_aMarker));

View file

@ -23,7 +23,6 @@ class CDemoRecorder : public IDemoRecorder
int m_NumTimelineMarkers;
int m_aTimelineMarkers[MAX_TIMELINE_MARKERS];
bool m_NoMapData;
unsigned int m_MapSize;
unsigned char *m_pMapData;
DEMOFUNC_FILTER m_pfnFilter;