feat: use local mappings if available

This commit is contained in:
2026-04-28 13:12:50 -03:00
parent 9dbe4a89c3
commit 7aea94a60a
+14 -4
View File
@@ -26,10 +26,20 @@ class Dumper
/*
* ensure mapping
*/
string mappingPath = Path.Combine(Path.GetTempPath(), "DeadByDaylight.usmap");
bool hasDownloadedMapping = await DownloadMappingFileAsync(Constants.MappingURL, mappingPath);
if (!hasDownloadedMapping)
return false;
string mappingPath;
string baseDir = AppDomain.CurrentDomain.BaseDirectory;
string localMappingPath = Path.GetFullPath(Path.Combine(baseDir, "..", "..", "..", "res", "mappings", "latest-xbox.usmap"));
if (File.Exists(localMappingPath))
mappingPath = localMappingPath;
else
{
mappingPath = Path.Combine(Path.GetTempPath(), "DeadByDaylight.usmap");
bool hasDownloadedMapping = await DownloadMappingFileAsync(Constants.MappingURL, mappingPath);
if (!hasDownloadedMapping)
return false;
}
/*
* compression setup