AICharacte syncing bugfixes, cleanbuild removes the temp save folder, minor networkevent optimizations (enum max value == GetValues().Length-1)
This commit is contained in:
@@ -567,17 +567,18 @@ namespace Barotrauma
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
DebugConsole.ThrowError("Directory ''" + SavePath + "'' not found and creating the directory failed.", e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
string[] filePaths;
|
||||
List<string> filePaths;
|
||||
string[] subDirectories;
|
||||
|
||||
try
|
||||
{
|
||||
filePaths = Directory.GetFiles(SavePath);
|
||||
filePaths = Directory.GetFiles(SavePath).ToList();
|
||||
subDirectories = Directory.GetDirectories(SavePath);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -585,6 +586,19 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (string subDirectory in subDirectories)
|
||||
{
|
||||
try
|
||||
{
|
||||
filePaths.AddRange(Directory.GetDirectories(subDirectory));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError("Couldn't open subdirectory ''" + subDirectory + "''!", e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string path in filePaths)
|
||||
{
|
||||
//Map savedMap = new Map(mapPath);
|
||||
|
||||
Reference in New Issue
Block a user