From 116526396a9fc3d091aa0d2cc39d796c5313c6f8 Mon Sep 17 00:00:00 2001 From: SmileyAG <58108407+SmileyAG@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:09:47 +0400 Subject: [PATCH] runtime_data: declared checksums structure --- BunnymodXT/runtime_data.cpp | 18 ++++++++++++++++++ BunnymodXT/runtime_data.hpp | 9 ++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/BunnymodXT/runtime_data.cpp b/BunnymodXT/runtime_data.cpp index 5da3def2..4e26ff59 100644 --- a/BunnymodXT/runtime_data.cpp +++ b/BunnymodXT/runtime_data.cpp @@ -46,6 +46,7 @@ namespace RuntimeData PLAYERHEALTH, SPLIT_MARKER, FLAGS, + CHECKSUMS, }; // Encrypting filter. @@ -367,6 +368,14 @@ namespace RuntimeData archive(f.flags); } + void operator()(const Checksums& c) const { + archive(RuntimeDataType::CHECKSUMS); + + archive(c.client); + archive(c.server); + archive(c.map); + } + private: Archive& archive; }; @@ -489,6 +498,14 @@ namespace RuntimeData data = f; break; } + case RuntimeDataType::CHECKSUMS: { + Checksums c; + archive(c.client); + archive(c.server); + archive(c.map); + data = c; + break; + } default: { EngineDevWarning("Read unknown RuntimeDataType %d\n", data_type); break; @@ -554,6 +571,7 @@ namespace RuntimeData void operator()(const RuntimeData::Edicts& e) const {} void operator()(const RuntimeData::SplitMarker& m) const {} void operator()(const RuntimeData::Flags& f) const {} + void operator()(const RuntimeData::Checksums& c) const {} private: // bxt commands that should be executed when found during demo playback diff --git a/BunnymodXT/runtime_data.hpp b/BunnymodXT/runtime_data.hpp index 8f29140d..8c2dec32 100644 --- a/BunnymodXT/runtime_data.hpp +++ b/BunnymodXT/runtime_data.hpp @@ -67,6 +67,12 @@ namespace RuntimeData int flags; }; + struct Checksums { + std::string client; + std::string server; + std::string map; + }; + using Data = boost::variant; + Flags, + Checksums>; void Add(Data data); void Clear();