Merge pull request #8754 from ChillerDragon/pr_fix_06_demo_cutting

Fix cutting 0.6 demos
This commit is contained in:
Dennis Felsing 2024-08-18 06:29:33 +00:00 committed by GitHub
commit 9fe2203a24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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(); return m_DemoPlayer.ErrorMessage();
} }
m_Sixup = str_startswith(m_DemoPlayer.Info()->m_Header.m_aNetversion, "0.7"); m_Sixup = m_DemoPlayer.IsSixup();
m_DemoPlayer.SetSixup(m_Sixup);
// load map // load map
const CMapInfo *pMapInfo = m_DemoPlayer.GetMapInfo(); 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, ""); str_copy(m_aFilename, "");
return -1; return -1;
} }
m_Sixup = str_startswith(m_Info.m_Header.m_aNetversion, "0.7");
// save byte offset of map for later use // save byte offset of map for later use
m_MapOffset = io_tell(m_File); m_MapOffset = io_tell(m_File);

View file

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