mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Merge pull request #8754 from ChillerDragon/pr_fix_06_demo_cutting
Fix cutting 0.6 demos
This commit is contained in:
commit
9fe2203a24
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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; }
|
||||||
|
|
Loading…
Reference in a new issue