Fix cutting 0.6 demos

Closed #8748
This commit is contained in:
ChillerDragon 2024-08-17 10:49:34 +08:00
parent f057898ce0
commit e8fbb440b9
3 changed files with 2 additions and 3 deletions

View file

@ -3791,8 +3791,7 @@ const char *CClient::DemoPlayer_Play(const char *pFilename, int StorageType)
return m_DemoPlayer.ErrorMessage();
}
m_Sixup = str_startswith(m_DemoPlayer.Info()->m_Header.m_aNetversion, "0.7");
m_DemoPlayer.SetSixup(m_Sixup);
m_Sixup = m_DemoPlayer.IsSixup();
// load map
const CMapInfo *pMapInfo = m_DemoPlayer.GetMapInfo();

View file

@ -805,6 +805,7 @@ int CDemoPlayer::Load(class IStorage *pStorage, class IConsole *pConsole, const
str_copy(m_aFilename, "");
return -1;
}
m_Sixup = str_startswith(m_Info.m_Header.m_aNetversion, "0.7");
// save byte offset of map for later use
m_MapOffset = io_tell(m_File);

View file

@ -178,7 +178,6 @@ public:
int Update(bool RealTime = true);
bool IsSixup() const { return m_Sixup; }
void SetSixup(bool Sixup) { m_Sixup = Sixup; }
const CPlaybackInfo *Info() const { return &m_Info; }
bool IsPlaying() const override { return m_File != nullptr; }