(773ace2cd) Fixed RagdollParams/AnimationParams GetDefaultPath failing if there are multiple installed content packages that define characters with the same name. TODO: take custom ragdoll/anim paths into account when calculating content package hashes

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:40:57 +03:00
parent 2b95c55070
commit f01747e822
22 changed files with 207 additions and 921 deletions
@@ -362,10 +362,11 @@ namespace Barotrauma
case ContentType.Character:
XDocument doc = XMLExtensions.TryLoadXml(file.Path);
string speciesName = doc.Root.GetAttributeString("name", "");
filePaths.Add(RagdollParams.GetDefaultFile(speciesName));
//TODO: check non-default paths if defined
filePaths.Add(RagdollParams.GetDefaultFile(speciesName, this));
foreach (AnimationType animationType in Enum.GetValues(typeof(AnimationType)))
{
filePaths.Add(AnimationParams.GetDefaultFile(speciesName, animationType));
filePaths.Add(AnimationParams.GetDefaultFile(speciesName, animationType, this));
}
break;
}