From 53b01862d4e5a3882cf7633cfbec24d87f3fc5bf Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Mon, 6 May 2024 08:44:27 +0800 Subject: [PATCH] Remove netversion from demo editor init --- src/engine/client/client.cpp | 2 +- src/engine/client/demoedit.cpp | 2 +- src/engine/shared/demo.cpp | 3 +-- src/engine/shared/demo.h | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 860f42e77..39f9c8677 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -2910,7 +2910,7 @@ void CClient::InitInterfaces() m_pNotifications = Kernel()->RequestInterface(); m_pStorage = Kernel()->RequestInterface(); - m_DemoEditor.Init(m_pGameClient->NetVersion(), &m_SnapshotDelta, m_pConsole, m_pStorage); + m_DemoEditor.Init(&m_SnapshotDelta, m_pConsole, m_pStorage); m_ServerBrowser.SetBaseInfo(&m_aNetClient[CONN_CONTACT], m_pGameClient->NetVersion()); diff --git a/src/engine/client/demoedit.cpp b/src/engine/client/demoedit.cpp index faae70300..410331e8a 100644 --- a/src/engine/client/demoedit.cpp +++ b/src/engine/client/demoedit.cpp @@ -14,7 +14,7 @@ CDemoEdit::CDemoEdit(const char *pNetVersion, class CSnapshotDelta *pSnapshotDel m_EndTick = EndTick; // Init the demoeditor - m_DemoEditor.Init(pNetVersion, &m_SnapshotDelta, NULL, pStorage); + m_DemoEditor.Init(&m_SnapshotDelta, NULL, pStorage); } void CDemoEdit::Run() diff --git a/src/engine/shared/demo.cpp b/src/engine/shared/demo.cpp index 34ddbc3c3..4a3c67a5f 100644 --- a/src/engine/shared/demo.cpp +++ b/src/engine/shared/demo.cpp @@ -1219,9 +1219,8 @@ public: } }; -void CDemoEditor::Init(const char *pNetVersion, class CSnapshotDelta *pSnapshotDelta, class IConsole *pConsole, class IStorage *pStorage) +void CDemoEditor::Init(class CSnapshotDelta *pSnapshotDelta, class IConsole *pConsole, class IStorage *pStorage) { - m_pNetVersion = pNetVersion; m_pSnapshotDelta = pSnapshotDelta; m_pConsole = pConsole; m_pStorage = pStorage; diff --git a/src/engine/shared/demo.h b/src/engine/shared/demo.h index 3cb83d184..32777b424 100644 --- a/src/engine/shared/demo.h +++ b/src/engine/shared/demo.h @@ -190,10 +190,9 @@ class CDemoEditor : public IDemoEditor IConsole *m_pConsole; IStorage *m_pStorage; class CSnapshotDelta *m_pSnapshotDelta; - const char *m_pNetVersion; public: - virtual void Init(const char *pNetVersion, class CSnapshotDelta *pSnapshotDelta, class IConsole *pConsole, class IStorage *pStorage); + virtual void Init(class CSnapshotDelta *pSnapshotDelta, class IConsole *pConsole, class IStorage *pStorage); bool Slice(const char *pDemo, const char *pDst, int StartTick, int EndTick, DEMOFUNC_FILTER pfnFilter, void *pUser) override; };