From 640fe32a7e16d67efe75bf8615a3f0f72d628f59 Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Fri, 4 Oct 2024 09:55:04 -0400 Subject: [PATCH] idk what's going on here it's probably fine --- .../Installer Tasks/ReleaseCheckTask.cs | 21 ++++++++++++++++++- SPTInstaller/SPTInstaller.csproj | 4 ++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/SPTInstaller/Installer Tasks/ReleaseCheckTask.cs b/SPTInstaller/Installer Tasks/ReleaseCheckTask.cs index f6900bb..37e40d1 100644 --- a/SPTInstaller/Installer Tasks/ReleaseCheckTask.cs +++ b/SPTInstaller/Installer Tasks/ReleaseCheckTask.cs @@ -73,8 +73,27 @@ public class ReleaseCheckTask : InstallerTaskBase { patchNeedCheck = false; } + + /* + An example of the logic going on here because holy shit I can't keep track of why we do it this way -waffle.lazy + ---- Example data ---- + gameVersion : 32738 + sptVersion : 30626 + SourceClientVersion : 32678 + TargetClientVersion : 30626 + patchNeeded : true + ---------------------------- + + * spt client is 'outdated' if the game and target versions don't match + * or + * the game version is behind the mirror's source client version + sptClientIsOutdated = (30626 != 30626 || 32738 > 32678) && true + + * otherwise, if the game version doesn't match the mirror's source version, we assume live is outdated + liveClientIsOutdated = 32738 != 32678 && true + */ - bool sptClientIsOutdated = intSPTVersion != patchMirrorInfo.TargetClientVersion && patchNeedCheck; + bool sptClientIsOutdated = (intSPTVersion != patchMirrorInfo.TargetClientVersion || intGameVersion > patchMirrorInfo.SourceClientVersion) && patchNeedCheck; bool liveClientIsOutdated = intGameVersion != patchMirrorInfo.SourceClientVersion && patchNeedCheck; if (sptClientIsOutdated) diff --git a/SPTInstaller/SPTInstaller.csproj b/SPTInstaller/SPTInstaller.csproj index 360be56..13bf440 100644 --- a/SPTInstaller/SPTInstaller.csproj +++ b/SPTInstaller/SPTInstaller.csproj @@ -10,8 +10,8 @@ icon.ico Assets\spt_installer.ico Debug;Release;TEST - 2.91 - 2.91 + 2.92 + 2.92 SPT