(52202ffdf) Don't create walk and run animations if the character cannot enter a submarine.
This commit is contained in:
@@ -1278,12 +1278,20 @@ namespace Barotrauma
|
|||||||
string animFolder = AnimationParams.GetFolder(speciesName);
|
string animFolder = AnimationParams.GetFolder(speciesName);
|
||||||
foreach (AnimationType animType in Enum.GetValues(typeof(AnimationType)))
|
foreach (AnimationType animType in Enum.GetValues(typeof(AnimationType)))
|
||||||
{
|
{
|
||||||
if (animType != AnimationType.NotDefined)
|
switch (animType)
|
||||||
{
|
{
|
||||||
Type type = AnimationParams.GetParamTypeFromAnimType(animType, isHumanoid);
|
case AnimationType.Walk:
|
||||||
string fullPath = AnimationParams.GetDefaultFile(speciesName, animType);
|
case AnimationType.Run:
|
||||||
AnimationParams.Create(fullPath, speciesName, animType, type);
|
if (!ragdollParams.CanEnterSubmarine) { continue; }
|
||||||
|
break;
|
||||||
|
case AnimationType.SwimSlow:
|
||||||
|
case AnimationType.SwimFast:
|
||||||
|
break;
|
||||||
|
default: continue;
|
||||||
}
|
}
|
||||||
|
Type type = AnimationParams.GetParamTypeFromAnimType(animType, isHumanoid);
|
||||||
|
string fullPath = AnimationParams.GetDefaultFile(speciesName, animType);
|
||||||
|
AnimationParams.Create(fullPath, speciesName, animType, type);
|
||||||
}
|
}
|
||||||
if (!AllFiles.Contains(configFilePath))
|
if (!AllFiles.Contains(configFilePath))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user