/
dieoska
/
ddnet
Обзор
Документация
Войти
/
dieoska
/
ddnet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/engine/client/demoedit.cpp
27 строк
779 B
Pioooooo
Replace zero constants with nullptr
30 янв 2025, 07:03
30 янв 2025, 07:03
4963188
Код
Авторство
О чём код?
#include "demoedit.h" #include <engine/shared/demo.h> #include <engine/storage.h> CDemoEdit::CDemoEdit(const char *pNetVersion, class CSnapshotDelta *pSnapshotDelta, IStorage *pStorage, const char *pDemo, const char *pDst, int StartTick, int EndTick) : m_SnapshotDelta(*pSnapshotDelta), m_pStorage(pStorage) { str_copy(m_aDemo, pDemo); str_copy(m_aDst, pDst); m_StartTick = StartTick; m_EndTick = EndTick; // Init the demoeditor m_DemoEditor.Init(&m_SnapshotDelta, nullptr, pStorage); } void CDemoEdit::Run() { // Slice the current demo m_Success = m_DemoEditor.Slice(m_aDemo, m_aDst, m_StartTick, m_EndTick, nullptr, nullptr); // We remove the temporary demo file if slicing is successful if(m_Success) m_pStorage->RemoveFile(m_aDemo, IStorage::TYPE_SAVE); }