From 0c05054839e0835cc7f9759f24630040e473c36d Mon Sep 17 00:00:00 2001 From: Derek <1upderek@gmail.com> Date: Mon, 27 Nov 2023 23:06:49 -0500 Subject: [PATCH] Initialize save_history_count to the default value of sv_save_history_count_archived --- sp/src/game/server/ez2/ez2_save_metadata.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sp/src/game/server/ez2/ez2_save_metadata.cpp b/sp/src/game/server/ez2/ez2_save_metadata.cpp index dadc24dfa3c..4516aa44758 100644 --- a/sp/src/game/server/ez2/ez2_save_metadata.cpp +++ b/sp/src/game/server/ez2/ez2_save_metadata.cpp @@ -14,6 +14,15 @@ class CCustomSaveMetadata : public CAutoGameSystem { public: + bool Init() + { + ConVarRef save_history_count("save_history_count"); + ConVarRef sv_save_history_count_archived("sv_save_history_count_archived"); + Msg("Setting save_history_count to %d....\n", sv_save_history_count_archived.GetInt()); + save_history_count.SetValue(sv_save_history_count_archived.GetInt()); + return true; + } + void OnSave() {