Skip to content
This repository was archived by the owner on Jan 27, 2022. It is now read-only.

Commit 06f61ea

Browse files
committed
rename unpacked vpk to .vpk.backup if packing to make sure new vpk is packed properly
1 parent 4d3b4a9 commit 06f61ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

MapPacker/AssetPacker.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,17 @@ public void ExtractVPK() {
157157
//execute vpk file.vpk to extract
158158
string command = $"{vmapFile.Replace(".vmap", ".vpk")}";
159159
ExecuteCommandSync(command);
160+
if(parentForm.Pack)
161+
File.Move($"{vmapFile.Replace(".vmap", ".vpk")}", $"{vmapFile.Replace(".vmap", ".vpk.backup")}");
162+
//parentForm.PrintToConsole("\nExtracted vpk\n");
160163
parentForm.SetProgress(95);
161164
}
162165

163166
public void PackVPK() {
164167
// execute vpk outputDirectory to repack
165168
var command = $"{outputDirectory}";
166169
ExecuteCommandSync(command);
170+
//parentForm.PrintToConsole("\nPacked vpk\n");
167171
parentForm.SetProgress(0);
168172

169173
// delete temp directory

0 commit comments

Comments
 (0)