Unstable 0.1300.1.11
This commit is contained in:
+6
-1
@@ -131,7 +131,12 @@ namespace Barotrauma
|
||||
|
||||
public static string GetFolder(XDocument doc, string filePath)
|
||||
{
|
||||
var folder = doc.Root?.Element("animations")?.GetAttributeString("folder", string.Empty);
|
||||
var root = doc.Root;
|
||||
if (root?.IsOverride() ?? false)
|
||||
{
|
||||
root = root.FirstElement();
|
||||
}
|
||||
var folder = root?.Element("animations")?.GetAttributeString("folder", string.Empty);
|
||||
if (string.IsNullOrEmpty(folder) || folder.Equals("default", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
folder = Path.Combine(Path.GetDirectoryName(filePath), "Animations");
|
||||
|
||||
Reference in New Issue
Block a user