From 293b1f700322dfe1493e694d43aca5c8d09772cc Mon Sep 17 00:00:00 2001 From: LazyDuchess <42678262+LazyDuchess@users.noreply.github.com> Date: Sat, 24 Dec 2022 12:21:22 -0300 Subject: [PATCH] Don't clear cache for package when writing to file. --- Assets/Scripts/OpenTS2/Files/Formats/DBPF/DBPFFile.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/OpenTS2/Files/Formats/DBPF/DBPFFile.cs b/Assets/Scripts/OpenTS2/Files/Formats/DBPF/DBPFFile.cs index 666b867..0fa6877 100644 --- a/Assets/Scripts/OpenTS2/Files/Formats/DBPF/DBPFFile.cs +++ b/Assets/Scripts/OpenTS2/Files/Formats/DBPF/DBPFFile.cs @@ -196,7 +196,7 @@ namespace OpenTS2.Files.Formats.DBPF } bool _deleted = false; public bool DeleteIfEmpty = true; - private readonly DBPFFileChanges _changes; + private DBPFFileChanges _changes; public ContentProvider Provider = null; /// @@ -410,9 +410,10 @@ namespace OpenTS2.Files.Formats.DBPF Filesystem.Write(FilePath, data); var stream = File.OpenRead(FilePath); Read(stream); - Changes.Clear(); + _changes = new DBPFFileChanges(this); return; } + /// /// Serializes package with all resource changes, additions and deletions. ///