feat: use local mappings if available
This commit is contained in:
+14
-4
@@ -26,10 +26,20 @@ class Dumper
|
|||||||
/*
|
/*
|
||||||
* ensure mapping
|
* ensure mapping
|
||||||
*/
|
*/
|
||||||
string mappingPath = Path.Combine(Path.GetTempPath(), "DeadByDaylight.usmap");
|
string mappingPath;
|
||||||
bool hasDownloadedMapping = await DownloadMappingFileAsync(Constants.MappingURL, mappingPath);
|
|
||||||
if (!hasDownloadedMapping)
|
string baseDir = AppDomain.CurrentDomain.BaseDirectory;
|
||||||
return false;
|
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
|
* compression setup
|
||||||
|
|||||||
Reference in New Issue
Block a user