Skip to content

Commit 9a6d3b8

Browse files
committed
3.2.2 update files
1 parent ae3b887 commit 9a6d3b8

3 files changed

Lines changed: 23 additions & 16 deletions

File tree

Wauncher/Services/UpdateService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ await DownloadManager.DownloadPatch(
309309

310310
try
311311
{
312-
var patches = await PatchManager.ValidatePatches();
312+
var patches = await PatchManager.ValidatePatches(deleteOutdatedFiles: false);
313313
_cachedPatches = patches;
314314
return patches;
315315
}

Wauncher/Utils/Patch.cs

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,33 @@ public static async Task<Patches> ValidatePatches(bool validateAll = false, bool
104104

105105
if (File.Exists(pakDatPath))
106106
{
107-
if (Debug.Enabled())
108-
Terminal.Debug("Checking hash for: csgo/pak_dat.vpk");
109-
110107
string pakDatHash = await GetHash(pakDatPath);
111108
if (pakDatHash == pakDatPatch.Hash)
112109
{
113-
if (Debug.Enabled())
114-
Terminal.Debug("csgo/pak_dat.vpk is up to date - skipping other file checks");
115-
skipValidation = true;
116-
return new Patches(true, missing, outdated);
110+
// pak_dat.vpk matches — also check pak01_dir.vpk before declaring up to date
111+
var dirPatchFast = patches.FirstOrDefault(p => p.File.Contains("pak01_dir.vpk"));
112+
if (dirPatchFast != null)
113+
{
114+
string dirOriginal = GetOriginalFileName(dirPatchFast.File);
115+
string dirPathFast = Path.Combine(Directory.GetCurrentDirectory(), dirOriginal);
116+
if (File.Exists(dirPathFast))
117+
{
118+
string dirHash = await GetHash(dirPathFast);
119+
if (dirHash == dirPatchFast.Hash)
120+
{
121+
skipValidation = true;
122+
return new Patches(true, missing, outdated);
123+
}
124+
}
125+
}
126+
else
127+
{
128+
skipValidation = true;
129+
return new Patches(true, missing, outdated);
130+
}
117131
}
118132
else
119133
{
120-
if (Debug.Enabled())
121-
Terminal.Debug("csgo/pak_dat.vpk is outdated - will check all files");
122134
if (deleteOutdatedFiles)
123135
File.Delete(pakDatPath);
124136
}

Wauncher/Views/MainWindow.axaml.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,20 +291,15 @@ private void ViewModel_PropertyChanged(object? sender, PropertyChangedEventArgs
291291
return;
292292
}
293293

294-
if (string.Equals(vm.GameStatus, "Not Running", StringComparison.OrdinalIgnoreCase) &&
295-
!IsVisible)
294+
if (string.Equals(vm.GameStatus, "Not Running", StringComparison.OrdinalIgnoreCase))
296295
{
297296
Dispatcher.UIThread.Post(() =>
298297
{
299298
_forceClose = true;
300299
Close();
301300
});
302301
MemoryManager.StopBackgroundCleanup();
303-
return;
304302
}
305-
306-
if (string.Equals(vm.GameStatus, "Not Running", StringComparison.OrdinalIgnoreCase))
307-
MemoryManager.StopBackgroundCleanup();
308303
}
309304

310305
private static Image[] CreateCarouselImages(int count)

0 commit comments

Comments
 (0)